ordercloud-javascript-sdk
    Preparing search index...

    Class Catalogs

    Index
    • Returns this

      enables impersonation by calling the subsequent method with the stored impersonation token

      Catalogs.As().List() // lists Catalogs using the impersonated users' token
      
    • Delete a catalog Check out the docs for more info

      Parameters

      • catalogID: string

        ID of the catalog.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Delete a catalog assignment Check out the docs for more info

      Parameters

      • catalogID: string

        ID of the catalog.

      • listOptions: { buyerGroupID?: string; buyerID?: string } = {}
        • OptionalbuyerGroupID?: string

          ID of the buyer group.

        • OptionalbuyerID?: string

          ID of the buyer.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Delete a catalog bundle assignment Check out the docs for more info

      Parameters

      • catalogID: string

        ID of the catalog.

      • bundleID: string

        ID of the bundle.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Delete a catalog product assignment Check out the docs for more info

      Parameters

      • catalogID: string

        ID of the catalog.

      • productID: string

        ID of the product.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Retrieve a catalog Check out the docs for more info

      Type Parameters

      Parameters

      • catalogID: string

        ID of the catalog.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredDeep<TCatalog>>

    • List catalogs Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "Name" | "Description")[];
            sortBy?: ("ID" | "Name" | "!ID" | "!Name" | "OwnerID" | "!OwnerID")[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "Name" | "Description")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "Name" | "!ID" | "!Name" | "OwnerID" | "!OwnerID")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredObjectDeep<ListPage<TCatalog>>>

    • List catalog assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            buyerGroupID?: string;
            buyerID?: string;
            catalogID?: string;
            page?: number;
            pageSize?: number;
        } = {}
        • OptionalbuyerGroupID?: string

          ID of the buyer group.

        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionalcatalogID?: string

          ID of the catalog.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredObjectDeep<ListPage<TCatalogAssignment>>>

    • List catalog bundle assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: { bundleID?: string; catalogID?: string; page?: number; pageSize?: number } = {}
        • OptionalbundleID?: string

          ID of the bundle.

        • OptionalcatalogID?: string

          ID of the catalog.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredObjectDeep<ListPage<TBundleCatalogAssignment>>>

    • List catalog product assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: { catalogID?: string; page?: number; pageSize?: number; productID?: string } = {}
        • OptionalcatalogID?: string

          ID of the catalog.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • OptionalproductID?: string

          ID of the product.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredObjectDeep<ListPage<TProductCatalogAssignment>>>

    • Create or update a catalog If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

      Type Parameters

      Parameters

      • catalogID: string

        ID of the catalog.

      • catalog: Catalog

        Required fields: Name

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredDeep<TCatalog>>

    • Create or update a catalog assignment Check out the docs for more info

      Parameters

      • catalogAssignment: CatalogAssignment

        Required fields: CatalogID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Create or update a catalog bundle assignment Check out the docs for more info

      Parameters

      • bundleCatalogAssignment: BundleCatalogAssignment

        Required fields: CatalogID, BundleID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • Create or update a catalog product assignment Check out the docs for more info

      Parameters

      • productCatalogAssignment: ProductCatalogAssignment

        Required fields: CatalogID, ProductID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>