Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Products

*# API Overview

The Products API enables you to build merchandising apps that merchandisers use to add products to catalogs, configure products for your storefront, and manage products in their ecommerce channels.

For more information, see Products in the Salesforce B2C Commerce Infocenter.

Authentication & Authorization

The client managing product information must have access to the Products resource. 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

Add Products

Use the Products API to add new products to a catalog. You can add or update product details like attributes, variations, variation attributes, and images. You can also use the API to change a product’s catalog assignment.

If you are adding products from an external product information management (PIM) system, use the Mulesoft Accelerator component created for Commerce Cloud.

For more detail, see Variation Groups in the Salesforce B2C Commerce Infocenter.

b2c-commerce-products-screenshot-1.png

Create & Validate Variation Groups

Use the API to enable a shopper to switch between different variants on a product page. You can group variation products into variation groups or group master products by one or more attributes. The variants within a variation group are linked. Linked variants allow a shopper to switch between different variants.

For more detail, see Variation Groups in the Salesforce B2C Commerce Infocenter.

b2c-commerce-products-screenshot-2.png

Search for Variants

Use the Product API to enable merchants to use a set of filtering and sorting criteria to search for variants assigned to a master product, or variation group.

For more detail, see Product Variations in the Salesforce B2C Commerce Infocenter.

b2c-commerce-products-screenshot-3.png

Manage Product Options

Use the API to view and manage product options for a given product so that optional accessories, upgrades, or services can be sold with the product. For example, a product warranty or monogramming.

For more detail, see Product Options in the Salesforce B2C Commerce Infocenter.

b2c-commerce-products-screenshot-4.png*

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 { Products, ClientConfig } from "commerce-sdk";
// or
const { Products, 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 productsClient = new Products(clientConfig);
API Version: 1.4.4
Last Updated:

Hierarchy

  • BaseClient
    • Products

Index

Constructors

constructor

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

    • config: ClientConfig

    Returns Products

Properties

clientConfig

clientConfig: ClientConfig

Methods

assignVariationForMasterProduct

  • Assign a variation for a product master. If the variation product does not initially exist, one is created using the body that is passed.

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

    Parameters

    Returns Promise<Variant>

    A promise of type Variant.

  • Assign a variation for a product master. If the variation product does not initially exist, one is created using the body that is passed.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Variant; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: 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 : Variant>

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

assignVariationGroupToMasterProduct

  • Assign a variation group for a product. If the variation group product does not initially exist, one is created using the body passed in.

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

    Parameters

    Returns Promise<VariationGroup>

    A promise of type VariationGroup.

  • Assign a variation group for a product. If the variation group product does not initially exist, one is created using the body passed in.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationGroup>

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

createProduct

  • Create a product using the information provided. If a product with the same unique identifier exists, it is overwritten.

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

    Parameters

    Returns Promise<Product>

    A promise of type Product.

  • Create a product using the information provided. If a product with the same unique identifier exists, it is overwritten.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Product; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ 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 : Product>

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

createProductOption

  • Creates a local product option using the information provided or binds a shared product option to the product.

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

    Parameters

    Returns Promise<ProductOption>

    A promise of type ProductOption.

  • Creates a local product option using the information provided or binds a shared product option to the product.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ProductOption>

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

createProductOptionValue

  • Create a local product option value using the information provided.

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

    Parameters

    Returns Promise<ProductOptionValue>

    A promise of type ProductOptionValue.

  • Create a local product option value using the information provided.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ProductOptionValue>

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

createVariationAttribute

  • Create a variation attribute using the information provided.

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

    Parameters

    Returns Promise<VariationAttribute>

    A promise of type VariationAttribute.

  • Create a variation attribute using the information provided.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationAttribute>

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

createVariationAttributeValue

  • Create a product variation attribute value.

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

    Parameters

    Returns Promise<VariationAttributeValue>

    A promise of type VariationAttributeValue.

  • Create a product variation attribute value.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationAttributeValue>

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

deleteProduct

  • Permanently remove a product by ID.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Permanently remove a product by ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ 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.

deleteProductOption

  • Delete a local product option or unbind a shared product option from the product.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete a local product option or unbind a shared product option from the product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: 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.

deleteProductOptionValue

  • Delete a local product option value by ID.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete a local product option value by ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; optionId: 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.

deleteVariationAttribute

  • Delete the variation attribute by ID.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete the variation attribute by ID.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: 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.

deleteVariationAttributeValue

  • Delete the variation attribute value of a variation attribute bound to a product.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Delete the variation attribute value of a variation attribute bound to a product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ attributeId: string; id: 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.

getCategorizationAttributeDefinitions

  • Get the list of allowed attributes, values, and operators for creating rule-based categorization conditions.

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

    Parameters

    Returns Promise<CategorizationAttributeDefinitionsResult>

    A promise of type CategorizationAttributeDefinitionsResult.

  • Get the list of allowed attributes, values, and operators for creating rule-based categorization conditions.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CategorizationAttributeDefinitionsResult>

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

getProduct

  • Retrieve detailed information about a specific product.

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

    Parameters

    Returns Promise<Product>

    A promise of type Product.

  • Retrieve detailed information about a specific product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ organizationId: string; productId: string; siteId?: 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 : Product>

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

getProductOption

  • Read a local or shared product option for a specified product.

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

    Parameters

    Returns Promise<ProductOption>

    A promise of type ProductOption.

  • Read a local or shared product option for a specified product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ currency?: CurrencyCode; id: 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 : ProductOption>

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

getProductOptionValue

  • Read a local product option value for a specified product.

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

    Parameters

    Returns Promise<ProductOptionValue>

    A promise of type ProductOptionValue.

  • Read a local product option value for a specified product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; optionId: 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 : ProductOptionValue>

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

getProductOptions

  • Read local and shared product options for a specified product.

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

    Parameters

    Returns Promise<ProductOptions>

    A promise of type ProductOptions.

  • Read local and shared product options for a specified product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ currency?: CurrencyCode; limit?: number; offset?: number; 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 : ProductOptions>

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

getVariationAttribute

  • Get variation attribute information only for master product.

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

    Parameters

    Returns Promise<VariationAttribute>

    A promise of type VariationAttribute.

  • Get variation attribute information only for master product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: 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 : VariationAttribute>

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

getVariationAttributeValue

  • Get product variation attribute information.

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

    Parameters

    Returns Promise<VariationAttributeValue>

    A promise of type VariationAttributeValue.

  • Get product variation attribute information.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ attributeId: string; id: string; organizationId: string; productId: string; siteId?: 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 : VariationAttributeValue>

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

getVariationAttributes

  • Read variation attributes of a product of type variant, variation master, or variation group.

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

    Parameters

    Returns Promise<VariationAttributes>

    A promise of type VariationAttributes.

  • Read variation attributes of a product of type variant, variation master, or variation group.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; offset?: number; 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 : VariationAttributes>

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

getVariationForMasterProduct

  • Get details of a specific variation.

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

    Parameters

    Returns Promise<Variant>

    A promise of type Variant.

  • Get details of a specific variation.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: string; organizationId: string; siteId?: 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 : Variant>

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

getVariationGroupForMasterProduct

  • Read a variation group for a product.

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

    Parameters

    Returns Promise<VariationGroup>

    A promise of type VariationGroup.

  • Read a variation group for a product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: string; organizationId: string; siteId?: 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 : VariationGroup>

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

getVariationGroupsForMasterProduct

  • List all variation groups of a product.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<VariationGroups>

    A promise of type VariationGroups.

  • List all variation groups of a product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; masterProductId: string; offset?: number; organizationId: string; siteId?: 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 : VariationGroups>

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

getVariationsForMasterProduct

  • getVariationsForMasterProduct(options?: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; masterProductId: string; offset?: number; organizationId: string; siteId?: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>): Promise<Variants>
  • getVariationsForMasterProduct<T>(options?: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; masterProductId: string; offset?: number; organizationId: string; siteId?: string } & QueryParameters, CommonParameters>; retrySettings?: OperationOptions }>, rawResponse?: T): Promise<T extends true ? Response : Variants>
  • List all variations of a master product.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<Variants>

    A promise of type Variants.

  • List all variations of a master product.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ limit?: number; masterProductId: string; offset?: number; organizationId: string; siteId?: 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 : Variants>

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

searchProductVariations

  • Search product variations for master product or variation group product. The query attribute specifies a complex query that can be used to narrow down the search.

    This is the list of searchable attributes:

    Attribute Type
    id String
    productId String
    name String
    online SiteSpecific Boolean
    inStock Boolean
    searchable SiteSpecific Boolean
    ats - Available quantity to sell Double
    variationAttribute.ATTRIBUTE_ID (Ex:variation_attribute.color) String

    Sortable Fields:

    Attribute Type
    id String
    productId String
    name String
    online SiteSpecific Boolean
    inStock Boolean
    searchable SiteSpecific Boolean
    ats - Available quantity to sell Double

    Note: The calculated value of "online" and "searchable" is used in the search/sort. A search/sort by the site-specific attributes require the Site ID query parameter to be set. They are "online", "inStock", "searchable" and "ats". We assume that every field that starts with variationAttribute. is searchable and dot is followed by "ATTRIBUTE_ID".

    The list of expansions to retrieve product information. The expand values available are:

    • _base - Basic product information is retrieved. This expand is included by default.

    • all - All product information, including the following properties are retrieved:

    • image

    • price - siteId must be provided to see this property

    • priceCurrency - siteId must be provided to see this property

    • availability - Information related to the availability of the product variation. This expand is not included by default.

    • ats - siteId must be provided to see this property

    • inStock - siteId must be provided to see this property

    • online - siteId must be provided to see this property

    • searchable

    • variations - Information related to product variations is retrieved. This expand is included by default.

    • attributes - Information related to product variation attributes is retrieved. This expand is not included by default.

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

    Parameters

    Returns Promise<VariantSearchResult>

    A promise of type VariantSearchResult.

  • Search product variations for master product or variation group product. The query attribute specifies a complex query that can be used to narrow down the search.

    This is the list of searchable attributes:

    Attribute Type
    id String
    productId String
    name String
    online SiteSpecific Boolean
    inStock Boolean
    searchable SiteSpecific Boolean
    ats - Available quantity to sell Double
    variationAttribute.ATTRIBUTE_ID (Ex:variation_attribute.color) String

    Sortable Fields:

    Attribute Type
    id String
    productId String
    name String
    online SiteSpecific Boolean
    inStock Boolean
    searchable SiteSpecific Boolean
    ats - Available quantity to sell Double

    Note: The calculated value of "online" and "searchable" is used in the search/sort. A search/sort by the site-specific attributes require the Site ID query parameter to be set. They are "online", "inStock", "searchable" and "ats". We assume that every field that starts with variationAttribute. is searchable and dot is followed by "ATTRIBUTE_ID".

    The list of expansions to retrieve product information. The expand values available are:

    • _base - Basic product information is retrieved. This expand is included by default.

    • all - All product information, including the following properties are retrieved:

    • image

    • price - siteId must be provided to see this property

    • priceCurrency - siteId must be provided to see this property

    • availability - Information related to the availability of the product variation. This expand is not included by default.

    • ats - siteId must be provided to see this property

    • inStock - siteId must be provided to see this property

    • online - siteId must be provided to see this property

    • searchable

    • variations - Information related to product variations is retrieved. This expand is included by default.

    • attributes - Information related to product variation attributes is retrieved. This expand is not included by default.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariantSearchResult>

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

searchProducts

  • Search for products. The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets.

    The following is a list of searchable attributes with their corresponding buckets:

    Main:

    Attribute Type
    id String
    name String
    online SiteSpecific Boolean
    searchable SiteSpecific Boolean
    validFrom SiteSpecfic DateTime
    validTo SiteSpecfic DateTime
    type ProductType
    creationDate DateTime
    lastModified DateTime

    Catalog:

    Attribute Type
    catalogId String

    Category:

    Attribute Type
    categoryId String

    Special:

    type - {"item", "set, "bundle", "master", "partOfProductSet", "bundled", "variant", "variationGroup", "option", "retailSet", "partOfRetailSet"}

    The sortable properties are:

    Attribute Type
    id String
    name String
    creationDate DateTime

    Note that catalogId is the ID of the catalog to which products are assigned

    Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining id and catalogId, only a conjunction is allowed (AND), whereas id and searchable can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception is thrown. The product search retrieves additional properties of the product when expansions are used.

    The available expand attribute values are:

    • ‘all' retrieves all product properties. This is the default when no expand value is included in the request.

    • 'none' retrieves no expansion properties.

    • ‘availability' retrieves the following properties:

    • ats

    • inStock

    • online

    • ‘categories' retrieves the assignedCategories property.

    • ‘images' retrieves the image property.

    • ‘allImages' when used with images retrieves the following properties:

    • image

    • imageGroups

    • 'prices' retrieves the following properties:

    • price

    • priceCurrency

    • ‘sets' retrieves the following properties:

    • setProducts

    • productSets

    • ‘bundles' retrieves the following properties:

    • productBundles

    • bundledProduct

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

    Parameters

    Returns Promise<ProductSearchResult>

    A promise of type ProductSearchResult.

  • Search for products. The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets.

    The following is a list of searchable attributes with their corresponding buckets:

    Main:

    Attribute Type
    id String
    name String
    online SiteSpecific Boolean
    searchable SiteSpecific Boolean
    validFrom SiteSpecfic DateTime
    validTo SiteSpecfic DateTime
    type ProductType
    creationDate DateTime
    lastModified DateTime

    Catalog:

    Attribute Type
    catalogId String

    Category:

    Attribute Type
    categoryId String

    Special:

    type - {"item", "set, "bundle", "master", "partOfProductSet", "bundled", "variant", "variationGroup", "option", "retailSet", "partOfRetailSet"}

    The sortable properties are:

    Attribute Type
    id String
    name String
    creationDate DateTime

    Note that catalogId is the ID of the catalog to which products are assigned

    Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining id and catalogId, only a conjunction is allowed (AND), whereas id and searchable can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception is thrown. The product search retrieves additional properties of the product when expansions are used.

    The available expand attribute values are:

    • ‘all' retrieves all product properties. This is the default when no expand value is included in the request.

    • 'none' retrieves no expansion properties.

    • ‘availability' retrieves the following properties:

    • ats

    • inStock

    • online

    • ‘categories' retrieves the assignedCategories property.

    • ‘images' retrieves the image property.

    • ‘allImages' when used with images retrieves the following properties:

    • image

    • imageGroups

    • 'prices' retrieves the following properties:

    • price

    • priceCurrency

    • ‘sets' retrieves the following properties:

    • setProducts

    • productSets

    • ‘bundles' retrieves the following properties:

    • productBundles

    • bundledProduct

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ProductSearchResult>

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

unassignVariationFromMasterProduct

  • Unassign a variation product from a product. The variation product is not deleted: it remains as a typical product after unassign.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Unassign a variation product from a product. The variation product is not deleted: it remains as a typical product after unassign.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: 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.

unassignVariationGroupFromMasterProduct

  • Unassign a variation group product from a product. The variation group product is not deleted: it remains as a typical product after unassign.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Unassign a variation group product from a product. The variation group product is not deleted: it remains as a typical product after unassign.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: 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.

updateProduct

  • Update a product using the information provided. Fields that can be updated: name, pageDescription, longDescription, pageTitle, pageKeywords, brand, ean, upc, manufactureSku, manufactureName, searchable, unit, searchable, onlineFlag, defaultVariantId. Custom attributes are used to extend a standard Product system object. This endpoint can be used to update custom attribute values for a particular product SKU. If you try to update a non-existent custom attribute, the request won't fail, but no changes are made and the attribute is not created.

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

    Parameters

    Returns Promise<Product>

    A promise of type Product.

  • Update a product using the information provided. Fields that can be updated: name, pageDescription, longDescription, pageTitle, pageKeywords, brand, ean, upc, manufactureSku, manufactureName, searchable, unit, searchable, onlineFlag, defaultVariantId. Custom attributes are used to extend a standard Product system object. This endpoint can be used to update custom attribute values for a particular product SKU. If you try to update a non-existent custom attribute, the request won't fail, but no changes are made and the attribute is not created.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Product; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ 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 : Product>

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

updateProductOption

  • Update a local product option with the information provided.

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

    Parameters

    Returns Promise<ProductOption>

    A promise of type ProductOption.

  • Update a local product option with the information provided.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ProductOption>

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

updateProductOptionValue

  • Update a local product option value using the information provided.

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

    Parameters

    Returns Promise<ProductOptionValue>

    A promise of type ProductOptionValue.

  • Update a local product option value using the information provided.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ProductOptionValue>

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

updateVariationAttribute

  • Update the variation attribute with the specified information. name slicing

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

    Parameters

    Returns Promise<VariationAttribute>

    A promise of type VariationAttribute.

  • Update the variation attribute with the specified information. name slicing

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationAttribute>

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

updateVariationAttributeValue

  • Update the variation attribute value of a variation attribute of a product.

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

    Parameters

    Returns Promise<VariationAttributeValue>

    A promise of type VariationAttributeValue.

  • Update the variation attribute value of a variation attribute of a product.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationAttributeValue>

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

updateVariationForMasterProduct

  • Update a variation for a product.

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

    Parameters

    Returns Promise<Variant>

    A promise of type Variant.

  • Update a variation for a product.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Variant; fetchOptions?: RequestInit; headers?: {}; parameters?: CompositeParameters<{ id: string; masterProductId: 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 : Variant>

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

updateVariationGroupForMasterProduct

  • Update a variation group for a product master.

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

    Parameters

    Returns Promise<VariationGroup>

    A promise of type VariationGroup.

  • Update a variation group for a product master.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : VariationGroup>

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

Generated using TypeDoc