Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CatalogsV1

*# API Overview

With the Catalogs API, you can:

  • Create, view, edit, and delete catalogs and categories.
  • Assign and unassign products to categories.
  • Search for a product within a category.
  • Search for categories within a catalog or within a merchandising system.

For more information, see the Catalogs and Categories sections of the Salesforce B2C Commerce Infocenter.

Authentication & Authorization

The client managing catalog and category information must have access to the Categories and Catalogs resources. This API requires a bearer token in the header of the request. The client accessing the API must first authenticate against Account Manager to get the bearer token.

You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see the Authorization Scopes Catalog.

Use Cases

Here are some common use cases for the API:

Categorize Products

Use the Catalogs API to assign products to categories so that shoppers can find all products that are merchandized in that category.

b2c-commerce-catalogs-screenshot-1.png

Validate Product Category Assignments

Use the Catalogs API to search for products assigned to a category within a site catalog to validate whether a product is merchandized and ready to be sold in one or more ecommerce channels. You can also update a product to make sure it meets the readiness criteria for each channel.

b2c-commerce-catalogs-screenshot-2.png

Edit Categories

Use the Catalogs API to edit categories assigned to a catalog to change the navigation path, make a category online or offline, change position of a category relative to other categories within a catalog.

b2c-commerce-catalogs-screenshot-3.png

Resources

A Salesforce B2C Commerce storefront implementation uses a Catalog, Category, and Product architecture to organize your storefront. Product data is stored in a catalog, and the stored product data is organized by categories. You can create any number of catalog, category, and product scenarios to address your business needs.

Catalogs

A catalog is a collection of categories, products, and images. It’s best practice to create two catalogs: the master catalog and the storefront catalog. The master catalog provides the same structure as an external system of record for your products. The storefront catalog is where you create categories that appear on your storefront.

Categories

You create and organize categories and subcategories to organize and group products in your catalog and on your storefront. Categories allow Products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category also can provide a context that is inherited by subcategories, for example a category may have an attribute value assigned to it and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product.

Products

Products are the items and services for sale on the storefront. All of your product data is stored in your master catalog. For a product or service to show on your storefront, it must be assigned to a category.*

For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html

Example with admin auth

import { CatalogsV1, ClientConfig } from "commerce-sdk";
// or
const { CatalogsV1, ClientConfig } = require("commerce-sdk");

const clientConfig: ClientConfig = {
  parameters: {
    clientId: "XXXXXX",
    organizationId: "XXXX",
    shortCode: "XXX",
    siteId: "XX"
  }
};

token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' };

clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
const catalogsClient = new CatalogsV1(clientConfig);
API Version: 1.4.4
Last Updated:

Hierarchy

  • BaseClient
    • CatalogsV1

Index

Constructors

constructor

  • new CatalogsV1(config: ClientConfig): CatalogsV1
  • Parameters

    • config: ClientConfig

    Returns CatalogsV1

Properties

clientConfig

clientConfig: ClientConfig

Methods

addProductsToExclusionList

  • Add the product to the excluded product list for a given catalog and category. After a product is added as an excluded product for the category, the categorization process no longer categorizes that product for that category.

    If you would like to get a raw Response object use the other addProductsToExclusionList function.

    Parameters

    Returns Promise<ExcludedProductsResult>

    A promise of type ExcludedProductsResult.

  • Add the product to the excluded product list for a given catalog and category. After a product is added as an excluded product for the category, the categorization process no longer categorizes that product for that category.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ExcludedProductsResult>

    A promise of type Response if rawResponse is true, a promise of type ExcludedProductsResult otherwise.

assignProductToCategory

  • Create a category product assignment using the information provided.

    Because the assigned position n is a normalized target position, we verify that the product is assigned to a position that maintains the position order.

    For example, if we have products A, B, C at positions 1, 2, 3, and product D is assigned to position 2, the end result is products A, D, B, C with position order 1, 2, 3, 4.

    If there are n existing position assignments, assigning a new product to position >= n+1 results in a new assignment with position n+1.

    If you would like to get a raw Response object use the other assignProductToCategory function.

    Parameters

    Returns Promise<CategoryProductAssignment>

    A promise of type CategoryProductAssignment.

  • Create a category product assignment using the information provided.

    Because the assigned position n is a normalized target position, we verify that the product is assigned to a position that maintains the position order.

    For example, if we have products A, B, C at positions 1, 2, 3, and product D is assigned to position 2, the end result is products A, D, B, C with position order 1, 2, 3, 4.

    If there are n existing position assignments, assigning a new product to position >= n+1 results in a new assignment with position n+1.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategoryProductAssignment>

    A promise of type Response if rawResponse is true, a promise of type CategoryProductAssignment otherwise.

createCategoryInCatalog

  • Create a catalog category using the information provided.

    If you would like to get a raw Response object use the other createCategoryInCatalog function.

    Parameters

    Returns Promise<Category>

    A promise of type Category.

  • Create a catalog category using the information provided.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Category; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Category>

    A promise of type Response if rawResponse is true, a promise of type Category otherwise.

createCategoryRules

  • Create all rules and conditions within the catalog and category. This deletes any existing rules and conditions for that catalog and category combination, and recreates them based on the new request. The LocaleID, PrimaryFlag, and ClassificationFlag can be set on any of the individual rules, but they apply to the entire ruleset. For simplicity, those values can be provided with one of the rules. If they are provided with multiple rules, then they must all have the same value for all rules or it could produce undesired effects.

    If you would like to get a raw Response object use the other createCategoryRules function.

    Parameters

    Returns Promise<RulesResult>

    A promise of type RulesResult.

  • Create all rules and conditions within the catalog and category. This deletes any existing rules and conditions for that catalog and category combination, and recreates them based on the new request. The LocaleID, PrimaryFlag, and ClassificationFlag can be set on any of the individual rules, but they apply to the entire ruleset. For simplicity, those values can be provided with one of the rules. If they are provided with multiple rules, then they must all have the same value for all rules or it could produce undesired effects.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: RulesRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : RulesResult>

    A promise of type Response if rawResponse is true, a promise of type RulesResult otherwise.

createOrUpdateCategoryRuleCondition

  • Create or update a condition.

    If you would like to get a raw Response object use the other createOrUpdateCategoryRuleCondition function.

    Parameters

    Returns Promise<Condition>

    A promise of type Condition.

  • Create or update a condition.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Condition; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Condition>

    A promise of type Response if rawResponse is true, a promise of type Condition otherwise.

createUpdateRule

  • Create or update a rule.

    If you would like to get a raw Response object use the other createUpdateRule function.

    Parameters

    Returns Promise<Rule>

    A promise of type Rule.

  • Create or update a rule.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: RuleRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Rule>

    A promise of type Response if rawResponse is true, a promise of type Rule otherwise.

deleteCategoryFromCatalog

  • Delete a category by catalog ID and category ID.

    If you would like to get a raw Response object use the other deleteCategoryFromCatalog function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete a category by catalog ID and category ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

deleteCategoryRuleCondition

  • deleteCategoryRuleCondition(options?: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>): Promise<void>
  • deleteCategoryRuleCondition<T>(options?: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>, rawResponse?: T): Promise<T extends true ? Response : void>
  • Delete a condition.

    If you would like to get a raw Response object use the other deleteCategoryRuleCondition function.

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    Returns Promise<void>

    A promise of type void.

  • Delete a condition.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

deleteCategoryRuleConditions

  • Deletes all conditions for a given rule, catalog, and category.

    If you would like to get a raw Response object use the other deleteCategoryRuleConditions function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Deletes all conditions for a given rule, catalog, and category.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

deleteCategoryRules

  • Delete all rules and conditions for the given catalog and category.

    If you would like to get a raw Response object use the other deleteCategoryRules function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete all rules and conditions for the given catalog and category.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

deleteRule

  • Delete a rule.

    If you would like to get a raw Response object use the other deleteRule function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete a rule.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

getAssignedProductFromCategory

  • Retrieve a category product assignment.

    For example, if we have products A, B, C at positions 1, 2, 7.5, and we delete the assignment for product B, the result is products A, B, C at positions 1, null, 7.5.

    If you would like to get a raw Response object use the other getAssignedProductFromCategory function.

    Parameters

    Returns Promise<CategoryProductAssignment>

    A promise of type CategoryProductAssignment.

  • Retrieve a category product assignment.

    For example, if we have products A, B, C at positions 1, 2, 7.5, and we delete the assignment for product B, the result is products A, B, C at positions 1, null, 7.5.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; productId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : CategoryProductAssignment>

    A promise of type Response if rawResponse is true, a promise of type CategoryProductAssignment otherwise.

getCatalog

  • Gets the catalog with the specified information.

    If you would like to get a raw Response object use the other getCatalog function.

    Parameters

    Returns Promise<Catalog>

    A promise of type Catalog.

  • Gets the catalog with the specified information.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Catalog>

    A promise of type Response if rawResponse is true, a promise of type Catalog otherwise.

getCatalogs

  • Get the list of catalog IDs with no filtering.

    If you would like to get a raw Response object use the other getCatalogs function.

    Parameters

    Returns Promise<Catalogs>

    A promise of type Catalogs.

  • Get the list of catalog IDs with no filtering.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; offset?: number; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Catalogs>

    A promise of type Response if rawResponse is true, a promise of type Catalogs otherwise.

getCategoriesFromCatalog

  • Get all categories with no filtering.

    If you would like to get a raw Response object use the other getCategoriesFromCatalog function.

    Parameters

    Returns Promise<Categories>

    A promise of type Categories.

  • Get all categories with no filtering.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; limit?: number; offset?: number; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Categories>

    A promise of type Response if rawResponse is true, a promise of type Categories otherwise.

getCategorizationStatus

  • Get the status of the latest categorization job, which could be evaluation or execution. For evaluation, the matched count and a paginated list of product IDs are returned. For execution, the counts of the products that are assigned or unassigned are returned.

    If you would like to get a raw Response object use the other getCategorizationStatus function.

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; limit?: number; offset?: number; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    Returns Promise<ExecutionJobStatusResult>

    A promise of type ExecutionJobStatusResult.

  • Get the status of the latest categorization job, which could be evaluation or execution. For evaluation, the matched count and a paginated list of product IDs are returned. For execution, the counts of the products that are assigned or unassigned are returned.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; limit?: number; offset?: number; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ExecutionJobStatusResult>

    A promise of type Response if rawResponse is true, a promise of type ExecutionJobStatusResult otherwise.

getCategoryFromCatalog

  • By default, the server returns the first level of sub-categories, but you can specify another level by setting the levels parameter. Using a large value for levels can cause performance issues with large and deep category trees.

    If you would like to get a raw Response object use the other getCategoryFromCatalog function.

    Parameters

    Returns Promise<Category>

    A promise of type Category.

  • By default, the server returns the first level of sub-categories, but you can specify another level by setting the levels parameter. Using a large value for levels can cause performance issues with large and deep category trees.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; levels?: number; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Category>

    A promise of type Response if rawResponse is true, a promise of type Category otherwise.

getCategoryRuleCondition

  • Get a condition by ID.

    If you would like to get a raw Response object use the other getCategoryRuleCondition function.

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    Returns Promise<Condition>

    A promise of type Condition.

  • Get a condition by ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; conditionId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Condition>

    A promise of type Response if rawResponse is true, a promise of type Condition otherwise.

getCategoryRuleConditions

  • Get the conditions for a given rule, catalog and category.

    If you would like to get a raw Response object use the other getCategoryRuleConditions function.

    Parameters

    Returns Promise<ConditionsResult>

    A promise of type ConditionsResult.

  • Get the conditions for a given rule, catalog and category.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ConditionsResult>

    A promise of type Response if rawResponse is true, a promise of type ConditionsResult otherwise.

getCategoryRules

  • Get all rules for the given catalog and category.

    If you would like to get a raw Response object use the other getCategoryRules function.

    Parameters

    Returns Promise<RulesResult>

    A promise of type RulesResult.

  • Get all rules for the given catalog and category.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : RulesResult>

    A promise of type Response if rawResponse is true, a promise of type RulesResult otherwise.

getExclusionList

  • Get the list of excluded products for a given catalog and category.

    If you would like to get a raw Response object use the other getExclusionList function.

    Parameters

    Returns Promise<ExcludedProductsResult>

    A promise of type ExcludedProductsResult.

  • Get the list of excluded products for a given catalog and category.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ExcludedProductsResult>

    A promise of type Response if rawResponse is true, a promise of type ExcludedProductsResult otherwise.

getRuleById

  • Get a rule by ID.

    If you would like to get a raw Response object use the other getRuleById function.

    Parameters

    Returns Promise<Rule>

    A promise of type Rule.

  • Get a rule by ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; ruleId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Rule>

    A promise of type Response if rawResponse is true, a promise of type Rule otherwise.

removeProductsFromExclusionList

  • Delete products from the excluded products list for a catalog category.

    If you would like to get a raw Response object use the other removeProductsFromExclusionList function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete products from the excluded products list for a catalog category.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

runCategoryRules

  • Submit a job to evaluate or execute the rules. The evaluation returns a set of matching products based on the rules and conditions. The execution categorizes the products based on the evaluated results.

    If you would like to get a raw Response object use the other runCategoryRules function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Submit a job to evaluate or execute the rules. The evaluation returns a set of matching products based on the rules and conditions. The execution categorizes the products based on the evaluated results.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

searchCatalogs

  • Search for catalogs.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime

    There are two additional fields that can be used as search filters. They are not attributes in the CatalogWO object, but they can be used as filters to query catalogs based on site assignments.

    Attribute Type
    isMasterCatalog Boolean
    isStorefrontCatalog Boolean
    description String
    creationDate DateTime
    online Boolean
    position Double

    When you use isMasterCatalog in the search query, catalogs without any site assignments are returned. When you use isStorefrontCatalog in the search query, catalogs with one or more site assignments are returned.

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime

    If you would like to get a raw Response object use the other searchCatalogs function.

    Parameters

    Returns Promise<CatalogSearchResult>

    A promise of type CatalogSearchResult.

  • Search for catalogs.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime

    There are two additional fields that can be used as search filters. They are not attributes in the CatalogWO object, but they can be used as filters to query catalogs based on site assignments.

    Attribute Type
    isMasterCatalog Boolean
    isStorefrontCatalog Boolean
    description String
    creationDate DateTime
    online Boolean
    position Double

    When you use isMasterCatalog in the search query, catalogs without any site assignments are returned. When you use isStorefrontCatalog in the search query, catalogs with one or more site assignments are returned.

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CatalogSearchResult>

    A promise of type Response if rawResponse is true, a promise of type CatalogSearchResult otherwise.

searchCategories

  • Search for catalog categories. By default, the server returns the first level of subcategories, but you can specify another level by setting the levels parameter. Subcategories are sorted by category position, then by categoryId. Using a large value for levels can cause performance issues with large and deep category trees.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    catalogId String

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    position Double

    If no sorting clause is provided, categories are sorted by categoryId. If sorting clause(s) are provided, categoryId is used as a tiebreaker.

    If you would like to get a raw Response object use the other searchCategories function.

    Parameters

    Returns Promise<CategorySearchResult>

    A promise of type CategorySearchResult.

  • Search for catalog categories. By default, the server returns the first level of subcategories, but you can specify another level by setting the levels parameter. Subcategories are sorted by category position, then by categoryId. Using a large value for levels can cause performance issues with large and deep category trees.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    catalogId String

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    position Double

    If no sorting clause is provided, categories are sorted by categoryId. If sorting clause(s) are provided, categoryId is used as a tiebreaker.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategorySearchResult>

    A promise of type Response if rawResponse is true, a promise of type CategorySearchResult otherwise.

searchCategoriesInCatalog

  • Search for catalog categories in the scope of a catalog. By default, the server returns the first level of subcategories, but you can specify another level by setting the levels parameter. Subcategories are sorted by category position, then by categoryId. Using a large value for levels can cause performance issues with large and deep category trees.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    parentCategoryId String

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    position Double

    If no sorting clause is provided, categories are sorted by categoryId. If sorting clause(s) are provided, categoryId is used as a tiebreaker.

    If you would like to get a raw Response object use the other searchCategoriesInCatalog function.

    Parameters

    Returns Promise<CategorySearchResult>

    A promise of type CategorySearchResult.

  • Search for catalog categories in the scope of a catalog. By default, the server returns the first level of subcategories, but you can specify another level by setting the levels parameter. Subcategories are sorted by category position, then by categoryId. Using a large value for levels can cause performance issues with large and deep category trees.

    The query attribute specifies a complex query that can be used to narrow down the search with the following searchable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    parentCategoryId String

    The output of the query can also be sorted with the following sortable attributes:

    Attribute Type
    id String
    name String
    description String
    creationDate DateTime
    online Boolean
    position Double

    If no sorting clause is provided, categories are sorted by categoryId. If sorting clause(s) are provided, categoryId is used as a tiebreaker.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategorySearchResult>

    A promise of type Response if rawResponse is true, a promise of type CategorySearchResult otherwise.

searchProductsAssignedToCategory

  • The query attribute specifies a complex query that can be used to narrow down the search.

    Searchable attributes:

    Attribute Type
    productId String
    productName String
    onlineFlag Boolean
    searchable Boolean
    validFrom DateTime
    validTo DateTime
    creationDate DateTime

    Sortable Fields:

    Attribute Type
    productId String
    productName String
    position Double
    creationDate DateTime

    Expansions that can be applied for the search request:

    • product_base - String

    The product_base expand enables retrieval of the following basic product information:

    Attribute Type Function
    none String Does not fetch any expanded information.
    product_images String Fetch preview image and image groups specified for the given product.
    product_all_images String Fetch preview image, image groups specified for the product, and variant and variation group images.
    product_variations String Fetch variations-related information.
    product_availability String Fetch availability-related information.
    product_categories String Fetch category-related information.
    product_prices String Fetch price-related information.
    product_options String Fetch options-related information.
    product_all String Fetch all expanded information. This is the default used when no expand value is included in the request.

    Note: productAll includes the following:

    • brand
    • ean
    • link
    • longDescription
    • manufacturerName
    • manufacturerSku
    • name
    • pageDescription
    • pageKeywords
    • pageTitle
    • searchable
    • shortDescription
    • type
    • unit
    • upc

    If you would like to get a raw Response object use the other searchProductsAssignedToCategory function.

    Parameters

    Returns Promise<CategoryProductAssignmentSearchResult>

    A promise of type CategoryProductAssignmentSearchResult.

  • The query attribute specifies a complex query that can be used to narrow down the search.

    Searchable attributes:

    Attribute Type
    productId String
    productName String
    onlineFlag Boolean
    searchable Boolean
    validFrom DateTime
    validTo DateTime
    creationDate DateTime

    Sortable Fields:

    Attribute Type
    productId String
    productName String
    position Double
    creationDate DateTime

    Expansions that can be applied for the search request:

    • product_base - String

    The product_base expand enables retrieval of the following basic product information:

    Attribute Type Function
    none String Does not fetch any expanded information.
    product_images String Fetch preview image and image groups specified for the given product.
    product_all_images String Fetch preview image, image groups specified for the product, and variant and variation group images.
    product_variations String Fetch variations-related information.
    product_availability String Fetch availability-related information.
    product_categories String Fetch category-related information.
    product_prices String Fetch price-related information.
    product_options String Fetch options-related information.
    product_all String Fetch all expanded information. This is the default used when no expand value is included in the request.

    Note: productAll includes the following:

    • brand
    • ean
    • link
    • longDescription
    • manufacturerName
    • manufacturerSku
    • name
    • pageDescription
    • pageKeywords
    • pageTitle
    • searchable
    • shortDescription
    • type
    • unit
    • upc

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategoryProductAssignmentSearchResult>

    A promise of type Response if rawResponse is true, a promise of type CategoryProductAssignmentSearchResult otherwise.

unassignProductFromCategory

  • Remove a category product assignment.

    For example, if we have products A, B, C at positions 1, 2, 7.5, and we delete the assignment for product B, the result is products A, B, C at positions 1, null, 7.5.

    If you would like to get a raw Response object use the other unassignProductFromCategory function.

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Remove a category product assignment.

    For example, if we have products A, B, C at positions 1, 2, 7.5, and we delete the assignment for product B, the result is products A, B, C at positions 1, null, 7.5.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string; productId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateCatalog

  • Update the catalog with the specified information.

    If you would like to get a raw Response object use the other updateCatalog function.

    Parameters

    Returns Promise<Catalog>

    A promise of type Catalog.

  • Update the catalog with the specified information.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Catalog; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Catalog>

    A promise of type Response if rawResponse is true, a promise of type Catalog otherwise.

updateCategoryInCatalog

  • Update a catalog category using the information provided.

    If you would like to get a raw Response object use the other updateCategoryInCatalog function.

    Parameters

    Returns Promise<Category>

    A promise of type Category.

  • Update a catalog category using the information provided.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Category; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ catalogId: string; categoryId: string; organizationId: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Category>

    A promise of type Response if rawResponse is true, a promise of type Category otherwise.

updateProductCategoryAssignment

  • Update the category product assignment with the specified information, such as position. Because the assigned position n is a normalized target position, we verify that the product is assigned to a position that maintains position order.

    For example, if we have products A, B, C, D at positions 1, 2, 3, 4 and we update product A with a new position of 3, the end result is products B, C, A, D with position order 1, 2, 3, 4. If we then update product C to no position, the end result is products B, A, D, C with position order 1, 2, 3, null.

    If there are n existing positioned assignments, updating a product to position >= n results in a new assignment with a position that maintains the position order.

    If you would like to get a raw Response object use the other updateProductCategoryAssignment function.

    Parameters

    Returns Promise<CategoryProductAssignment>

    A promise of type CategoryProductAssignment.

  • Update the category product assignment with the specified information, such as position. Because the assigned position n is a normalized target position, we verify that the product is assigned to a position that maintains position order.

    For example, if we have products A, B, C, D at positions 1, 2, 3, 4 and we update product A with a new position of 3, the end result is products B, C, A, D with position order 1, 2, 3, 4. If we then update product C to no position, the end result is products B, A, D, C with position order 1, 2, 3, null.

    If there are n existing positioned assignments, updating a product to position >= n results in a new assignment with a position that maintains the position order.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategoryProductAssignment>

    A promise of type Response if rawResponse is true, a promise of type CategoryProductAssignment otherwise.

Generated using TypeDoc