---
schema_version: "1"
id: 25677e0e5030f09100355102ac382c47d301a0c4c62bef773fb349c355957680
title: Catalogs
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/references/generated-api-specs/catalogs.md
canonical_url: https://developer.salesforce.com/docs/commerce/commerce-api/references/catalogs
source_site: developer.salesforce.com
content_type: documentation
content_hash: 28770f7e2a1e22485fb031615d3b1cffcaf1dc2b065c44a56130f080ae1c9a75
products:
  - B2C Commerce API
  - Salesforce APIs
---
Catalogs

# Catalogs

[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/catalogs/catalogs-oas-v1-public.yaml)

## 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](https://help.salesforce.com/s/articleView?id=cc.b2c_catalogs.htm&type=5) section in the B2C Commerce documentation.

### 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 token. For a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)

For detailed setup instructions, see the [Authorization for Admin APIs guide.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html)

### Response Details

#### Timeouts

Admin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)

#### Error Handling

Error responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)

### 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](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/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](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/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](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/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.

### Related APIs

*   [Products (Admin)](https://developer.salesforce.com/docs/commerce/commerce-api/references/products?meta=Summary) — Manage products within catalogs.

**Version:** 1.0.47

## Servers

*   `https://{shortCode}.api.commercecloud.salesforce.com/product/catalogs/v1`
    *   `shortCode (default shortCode) An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)`

## Security

*   `AmOAuth2` (oauth2) AccountManager OAuth 2.0 bearer token Authentication.
    *   OAuth flow clientCredentials (tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token)
    *   Scope sfcc.catalogs: catalogs scope READONLY
    *   Scope sfcc.catalogs.rw: catalogs scope
    *   OAuth flow authorizationCode (authorizationUrl: https://account.demandware.com/dwsso/oauth2/authorize, tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token, refreshUrl: https://account.demandware.com/dwsso/oauth2/access\_token)

## Operations

### GET Retrieve a list of catalog IDs.

`GET /organizations/{organizationId}/catalogs`

Operation ID: `getCatalogs`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Get the list of catalog IDs with no filtering.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 50.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** Catalogs retrieved successfully.
    
    Media type: `application/json`. Schema: `Catalogs`.
    
    _Example: Catalogs_
    
    ```
    {
      "limit": 2,
      "data": [
        {
          "id": "apparel-catalog"
        },
        {
          "id": "electronics-catalog"
        }
      ],
      "offset": 0,
      "total": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: getCategoryFromCatalog400_
    
    ```
    {
      "title": "Bad Request",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-query-parameter",
      "detail": "offset-BAD-REQUEST parameters are not defined in RAML."
    }
    ```
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: getCatalog401_
    
    ```
    {
      "title": "Invalid Access Token",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-access-token",
      "detail": "The request is unauthorized, the access token is invalid.",
      "accessToken": "iI6IjEiLCJhbGciOiJIUzI1NiIsInR5cCI6Ik"
    }
    ```
    

### GET Retrieve details of a specific catalog.

`GET /organizations/{organizationId}/catalogs/{catalogId}`

Operation ID: `getCatalog`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Gets the catalog with the specified information.

#### Parameters

*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Catalog retrieved successfully.
    
    Media type: `application/json`. Schema: `Catalog`.
    
    _Example: Catalog_
    
    ```
    {
      "categoryCount": 30,
      "creationDate": "2019-02-21T22:09:39.000Z",
      "id": "apparel-catalog",
      "lastModified": "2019-02-21T22:09:39.000Z",
      "name": {
        "default": "Apparel Master Catalog"
      },
      "online": true,
      "recommendationCount": 0,
      "rootCategory": "root"
    }
    ```
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: getCatalog404_
    
    ```
    {
      "title": "Catalog Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/catalog-not-found",
      "detail": "No catalog with ID '095c2082-5f2a-47d5-bc73-27d06c5c9db8' could be found.",
      "catalogId": "095c2082-5f2a-47d5-bc73-27d06c5c9db8"
    }
    ```
    

### PATCH Update details of a specific catalog.

`PATCH /organizations/{organizationId}/catalogs/{catalogId}`

Operation ID: `updateCatalog`. Security: AmOAuth2 (sfcc.catalogs.rw).

Update the catalog with the specified information.

#### Parameters

*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `Catalog`.

_Example: CatalogBody_

```
{
  "id": "apparel-catalog",
  "online": true
}
```

#### Responses

*   **200** Catalog updated successfully.
    
    Media type: `application/json`. Schema: `Catalog`.
    
    _Example Catalog: same as GET /organizations/{organizationId}/catalogs/{catalogId} 200 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### GET Retrieve all categories within a catalog.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories`

Operation ID: `getCategoriesFromCatalog`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Get all categories with no filtering.

#### Parameters

*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 50.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** Categories retrieved successfully.
    
    Media type: `application/json`. Schema: `Categories`.
    
    _Example: Catalog_
    
    ```
    {
      "limit": 3,
      "data": [
        {
          "id": "kids-wear"
        },
        {
          "id": "mens"
        },
        {
          "id": "mens-accessories-luggage"
        }
      ],
      "offset": 0,
      "total": 3
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### GET Retrieve details of a specific category within a catalog.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}`

Operation ID: `getCategoryFromCatalog`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `levels` (query, integer (int32)) The level number.  
    Minimum: 0. Example: `1`.

#### Responses

*   **200** Category retrieved successfully.
    
    Media type: `application/json`. Schema: `Category`.
    
    _Example: CategoryExample_
    
    ```
    {
      "catalogId": "apparel-catalog",
      "categories": [
        {
          "catalogId": "apparel-catalog",
          "creationDate": "2019-02-21T22:09:40.000Z",
          "id": "mens-accessories",
          "lastModified": "2019-02-21T22:10:14.000Z",
          "name": {
            "default": "Accessories"
          },
          "online": true,
          "parentCategoryId": "mens"
        },
        {
          "catalogId": "apparel-catalog",
          "creationDate": "2019-02-21T22:09:40.000Z",
          "id": "mens-clothing",
          "lastModified": "2019-02-21T22:10:15.000Z",
          "name": {
            "default": "Clothing"
          },
          "online": true,
          "parentCategoryId": "mens"
        }
      ],
      "creationDate": "2019-02-21T22:09:40.000Z",
      "id": "mens",
      "lastModified": "2019-09-04T15:07:14.000Z",
      "online": true,
      "parentCategoryId": "root",
      "position": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### PUT Create or update a category within a catalog.

`PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}`

Operation ID: `createCategoryInCatalog`. Security: AmOAuth2 (sfcc.catalogs.rw).

Create a catalog category using the information provided.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `Category`.

_Example: CategoryBody_

```
{
  "catalogId": "apparel-catalog",
  "id": "mens",
  "online": true
}
```

#### Responses

*   **200** Category updated successfully.
    
    Media type: `application/json`. Schema: `Category`.
    
    _Example: SingleCategory_
    
    ```
    {
      "catalogId": "apparel-catalog",
      "creationDate": "2019-02-21T22:09:40.000Z",
      "id": "mens",
      "lastModified": "2019-09-04T15:07:14.000Z",
      "online": true,
      "parentCategoryId": "root",
      "position": 2
    }
    ```
    
*   **201** Category created successfully.
    
    Media type: `application/json`. Schema: `Category`.
    
    _Example SingleCategory: same as PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId} 200 response._
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Delete a specific category from a catalog.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}`

Operation ID: `deleteCategoryFromCatalog`. Security: AmOAuth2 (sfcc.catalogs.rw).

Delete a category by catalog ID and category ID.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** Category deleted successfully.
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### PATCH Update a specific category within a catalog.

`PATCH /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}`

Operation ID: `updateCategoryInCatalog`. Security: AmOAuth2 (sfcc.catalogs.rw).

Update a catalog category using the information provided.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `Category`.

_Example: CategoryBody_

```
{
  "catalogId": "apparel-catalog",
  "id": "mens",
  "online": true
}
```

#### Responses

*   **200** Category updated successfully.
    
    Media type: `application/json`. Schema: `Category`.
    
    _Example SingleCategory: same as PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId} 200 response._
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### POST Search for category product assignments.

`POST /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/category-product-assignment-search`

Operation ID: `searchProductsAssignedToCategory`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `siteId` (query, SiteId) The site context.

#### Request body (required)

Media type: `application/json`. Schema: `CategoryProductAssignmentSearchRequest`.

_Example: ProductAssignmentBody_

```
{
  "query": {
    "termQuery": {
      "fields": [
        "product_id"
      ],
      "operator": "is",
      "values": [
        "NTOSimpleBundle"
      ]
    }
  },
  "expand": [
    "product_categories",
    "product_images"
  ]
}
```

#### Responses

*   **200** Assignments searched successfully.
    
    Media type: `application/json`. Schema: `CategoryProductAssignmentSearchResult`.
    
    _Example: CategoryProductAssignment_
    
    ```
    {
      "hits": [
        {
          "catalogId": "NTOCatalog",
          "categoryId": "NTOFirstClassCategory",
          "creationDate": "2024-05-27T10:11:48.000Z",
          "lastModified": "2024-05-27T10:11:48.000Z",
          "owningCatalogName": {
            "default": "NTO Product Image Catalog"
          },
          "product": {
            "assignedCategories": [
              {
                "catalogId": "NTOCatalog",
                "categoryId": "NTOFirstClassCategory"
              }
            ],
            "brand": "Wapi brand",
            "creationDate": "2024-05-27T10:11:45.000Z",
            "id": "NTOSimpleBundle",
            "image": {
              "absUrl": "https://www.yoursecureimageserver.com/foo/bar/bundle_image_detail.jpg",
              "alt": {
                "default": "ALT bundle image detail"
              },
              "path": "bundle_image_detail.jpg",
              "title": {
                "default": "TITLE bundle image detail"
              }
            },
            "onlineFlag": {
              "default": true
            },
            "searchable": {
              "default": true
            }
          },
          "productId": "NTOSimpleBundle",
          "productName": {
            "default": "Simple Web API Bundle"
          }
        }
      ],
      "query": {
        "termQuery": {
          "fields": [
            "product_id"
          ],
          "operator": "is",
          "values": [
            "NTOSimpleBundle"
          ]
        }
      },
      "limit": 1,
      "offset": 0,
      "total": 1
    }
    ```
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### GET Retrieve a category product assignment.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId}`

Operation ID: `getAssignedProductFromCategory`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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.

#### Parameters

*   `productId` (path, ProductId, required) The ID (SKU) of the requested product to assign.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Assignment retrieved successfully.
    
    Media type: `application/json`. Schema: `CategoryProductAssignment`.
    
    _Example: CatalogCategoryPrdAssignmentExample_
    
    ```
    {
      "catalogId": "apparel-catalog",
      "categoryId": "kids-wear",
      "owningCatalogName": {
        "default": "Electronics Master Catalog"
      },
      "position": 1,
      "productId": "apple-ipod-shuffle",
      "productName": {
        "default": "Apple iPod Shuffle"
      }
    }
    ```
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### PUT Create a category product assignment.

`PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId}`

Operation ID: `assignProductToCategory`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `productId` (path, ProductId, required) The ID (SKU) of the requested product to assign.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `CategoryProductAssignment`.

_Example: CatalogCategoryProdAssignmentBody_

```
{
  "catalogId": "apparel-catalog",
  "categoryId": "kids-wear",
  "productId": "apple-ipod-shuffle",
  "position": 1
}
```

#### Responses

*   **200** Assignment updated successfully.
    
    Media type: `application/json`. Schema: `CategoryProductAssignment`.
    
    _Example CatalogCategoryPrdAssignmentExample: same as GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId} 200 response._
    
*   **201** Assignment created successfully.
    
    Media type: `application/json`. Schema: `CategoryProductAssignment`.
    
    _Example CatalogCategoryPrdAssignmentExample: same as GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId} 200 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Remove a category product assignment.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId}`

Operation ID: `unassignProductFromCategory`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `productId` (path, ProductId, required) The ID (SKU) of the requested product to assign.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** Assignment deleted successfully.
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### PATCH Update a category product assignment.

`PATCH /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId}`

Operation ID: `updateProductCategoryAssignment`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `productId` (path, ProductId, required) The ID (SKU) of the requested product to assign.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `CategoryProductAssignment`.

_Example: CatalogCategoryProdAssignmentBody_

```
{
  "catalogId": "apparel-catalog",
  "categoryId": "kids-wear",
  "productId": "apple-ipod-shuffle",
  "position": 1
}
```

#### Responses

*   **200** Assignment updated successfully.
    
    Media type: `application/json`. Schema: `CategoryProductAssignment`.
    
    _Example CatalogCategoryPrdAssignmentExample: same as GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/products/{productId} 200 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### GET Get the status of the latest categorization job.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules-execution`

Operation ID: `getCategorizationStatus`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `limit` (query, Limit) Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
    
    _Example: limit_
    
    ```
    25
    ```
    
*   `offset` (query, Offset) The zero-based index of the first hit/data to include in the result.
    
    _Example: offset_
    
    ```
    25
    ```
    

#### Responses

*   **200** Job executed status returned successfully.
    
    Media type: `application/json`. Schema: `ExecutionJobStatusResult`.
    
    _Example: ExecutionJobStatusResponse_
    
    ```
    {
      "type": "evaluation",
      "assignedCount": 1,
      "unassignedCount": 0,
      "matchedCount": 1,
      "jobStatus": "success",
      "message": "Job execution success.",
      "lastRunDate": "2019-02-21T22:09:40.000Z",
      "productIds": [
        "25772719"
      ],
      "limit": 10,
      "offset": 0
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: getCategorizationStatus404_
    
    ```
    {
      "title": "JobExecution Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/job-execition-not-found",
      "detail": "No JobExecution could be found for given catalog, category",
      "catalogId": "apparel-catalog",
      "category": "Mens"
    }
    ```
    

### POST Submit a job to evaluate or execute the rules.

`POST /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules-execution`

Operation ID: `runCategoryRules`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `ExecutionRequest`.

_Example: ExecutionRequestBody_

```
{
  "evaluation": true
}
```

#### Responses

*   **202** Job submitted successfully.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### GET Get the list of excluded products.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products`

Operation ID: `getExclusionList`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Excluded products retrieved successfully.
    
    Media type: `application/json`. Schema: `ExcludedProductsResult`.
    
    _Example: GetExcludedProducts_
    
    ```
    {
      "limit": 2,
      "data": [
        {
          "productId": "red-shirt"
        },
        {
          "productId": "blue-shirt"
        }
      ],
      "total": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### POST Add products to the exclusion list.

`POST /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products`

Operation ID: `addProductsToExclusionList`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `ExcludedProductRequest`.

_Example: ExcludedProductsRequestBody_

```
{
  "data": [
    {
      "productId": "red-shirt"
    },
    {
      "productId": "blue-shirt"
    }
  ]
}
```

#### Responses

*   **200** Excluded products list added for a catalog category.
    
    Media type: `application/json`. Schema: `ExcludedProductsResult`.
    
    _Example: GetExcludedProducts_
    
    ```
    {
      "limit": 2,
      "data": [
        {
          "productId": "red-shirt"
        },
        {
          "productId": "blue-shirt"
        }
      ],
      "total": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Remove products from the exclusion list.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products`

Operation ID: `removeProductsFromExclusionList`. Security: AmOAuth2 (sfcc.catalogs.rw).

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

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `ExcludedProductRequest`.

_Example: ExcludedProductsRequestBody_

```
{
  "data": [
    {
      "productId": "red-shirt"
    },
    {
      "productId": "blue-shirt"
    }
  ]
}
```

#### Responses

*   **204** No content.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: getRuleById404_
    
    ```
    {
      "title": "Rule Not Found",
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/rule-not-found",
      "detail": "No Rule with ID 'VHRULE' could be found.",
      "ruleId": "VHRULE"
    }
    ```
    

### GET Retrieve all rules for a catalog and category.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules`

Operation ID: `getCategoryRules`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Get all rules for the given catalog and category.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Rules retrieved successfully
    
    Media type: `application/json`. Schema: `RulesResult`.
    
    _Example: GetRules_
    
    ```
    {
      "limit": 2,
      "data": [
        {
          "id": "VHRule",
          "enabled": true,
          "exclusion": false,
          "categorizationLocaleId": "en-US",
          "categorizationClassificationFlag": true,
          "categorizationPrimaryFlag": true,
          "conditions": [
            {
              "id": "NameCondition",
              "attributeKey": "name",
              "attributeValue": [
                "Shirt"
              ],
              "attributeName": "name",
              "operator": "starts_with"
            },
            {
              "id": "BrandCondition",
              "attributeKey": "brand",
              "attributeValue": [
                "Van Heusen"
              ],
              "attributeName": "brand",
              "operator": "equals"
            }
          ]
        },
        {
          "id": "DXRule",
          "enabled": true,
          "exclusion": false,
          "categorizationLocaleId": "en-US",
          "categorizationClassificationFlag": true,
          "categorizationPrimaryFlag": true,
          "conditions": [
            {
              "id": "NameCondition",
              "attributeKey": "name",
              "attributeValue": [
                "Shirt"
              ],
              "attributeName": "name",
              "operator": "starts_with"
            },
            {
              "id": "BrandCondition",
              "attributeKey": "brand",
              "attributeValue": [
                "DX"
              ],
              "attributeName": "brand",
              "operator": "equals"
            }
          ]
        }
      ],
      "total": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### POST Create rules and conditions for a catalog and category.

`POST /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules`

Operation ID: `createCategoryRules`. Security: AmOAuth2 (sfcc.catalogs.rw).

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.

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `RulesRequest`.

_Example: PostRuleRequestBody_

```
{
  "data": [
    {
      "id": "VHRule",
      "enabled": true,
      "exclusion": false,
      "categorizationLocaleId": "en-US",
      "categorizationClassificationFlag": true,
      "categorizationPrimaryFlag": true,
      "conditions": [
        {
          "id": "NameCondition",
          "attributeKey": "name",
          "attributeValue": [
            "Shirt"
          ],
          "operator": "starts_with"
        },
        {
          "id": "BrandCondition",
          "attributeKey": "brand",
          "attributeValue": [
            "Van Heusen"
          ],
          "operator": "equals"
        }
      ]
    },
    {
      "id": "DXRule",
      "enabled": true,
      "exclusion": false,
      "categorizationLocaleId": "en-US",
      "categorizationClassificationFlag": true,
      "categorizationPrimaryFlag": true,
      "conditions": [
        {
          "id": "NameCondition",
          "attributeKey": "name",
          "attributeValue": [
            "Shirt"
          ],
          "operator": "starts_with"
        },
        {
          "id": "BrandCondition",
          "attributeKey": "brand",
          "attributeValue": [
            "DX"
          ],
          "operator": "equals"
        }
      ]
    }
  ]
}
```

#### Responses

*   **200** Rules created successfully.
    
    Media type: `application/json`. Schema: `RulesResult`.
    
    _Example GetRules: same as GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules 200 response._
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Delete all rules and conditions for a catalog and category.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules`

Operation ID: `deleteCategoryRules`. Security: AmOAuth2 (sfcc.catalogs.rw).

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

#### Parameters

*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** No content.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getRuleById404: same as DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products 404 response._
    

### GET Retrieve a rule by ID.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}`

Operation ID: `getRuleById`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Get a rule by ID.

#### Parameters

*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Rule retrieved successfully
    
    Media type: `application/json`. Schema: `Rule`.
    
    _Example: GetRulesByID_
    
    ```
    {
      "id": "VHRule",
      "enabled": true,
      "exclusion": false,
      "categorizationLocaleId": "en-US",
      "categorizationClassificationFlag": true,
      "categorizationPrimaryFlag": true,
      "conditions": [
        {
          "id": "NameCondition",
          "attributeKey": "name",
          "attributeValue": [
            "Shirt"
          ],
          "attributeName": "name",
          "operator": "starts_with"
        },
        {
          "id": "BrandCondition",
          "attributeKey": "brand",
          "attributeName": "brand",
          "attributeValue": [
            "Van Heusen"
          ],
          "operator": "equals"
        }
      ]
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getRuleById404: same as DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products 404 response._
    

### PUT Create or update a rule.

`PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}`

Operation ID: `createUpdateRule`. Security: AmOAuth2 (sfcc.catalogs.rw).

Create or update a rule.

#### Parameters

*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `RuleRequest`.

_Example: PutRuleRequestBody_

```
{
  "id": "VHRule",
  "enabled": true,
  "exclusion": false
}
```

#### Responses

*   **200** Rule updated successfully.
    
    Media type: `application/json`. Schema: `Rule`.
    
    _Example: PutRuleRequestBody_
    
    ```
    {
      "id": "VHRule",
      "enabled": true,
      "exclusion": false
    }
    ```
    
*   **201** Rule created successfully.
    
    Media type: `application/json`. Schema: `Rule`.
    
    _Example: PutRuleRequestBody_
    
    ```
    {
      "id": "VHRule",
      "enabled": true,
      "exclusion": false
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Delete a rule.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}`

Operation ID: `deleteRule`. Security: AmOAuth2 (sfcc.catalogs.rw).

Delete a rule.

#### Parameters

*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** No content.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getRuleById404: same as DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products 404 response._
    

### GET Retrieve conditions for a rule.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}/conditions`

Operation ID: `getCategoryRuleConditions`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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

#### Parameters

*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Conditions retrieved successfully.
    
    Media type: `application/json`. Schema: `ConditionsResult`.
    
    _Example: GetConditions_
    
    ```
    {
      "limit": 2,
      "conditions": [
        {
          "id": "NameCondition",
          "attributeKey": "name",
          "attributeValue": [
            "Shirt"
          ],
          "attributeName": "name",
          "operator": "starts_with"
        },
        {
          "id": "BrandCondition",
          "attributeKey": "brand",
          "attributeValue": [
            "Van Heusen"
          ],
          "attributeName": "brand",
          "operator": "equals"
        }
      ],
      "total": 2
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Delete all conditions for a rule.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}/conditions`

Operation ID: `deleteCategoryRuleConditions`. Security: AmOAuth2 (sfcc.catalogs.rw).

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

#### Parameters

*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** No content.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getRuleById404: same as DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products 404 response._
    

### GET Retrieve a condition by ID.

`GET /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}/conditions/{conditionId}`

Operation ID: `getCategoryRuleCondition`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

Get a condition by ID.

#### Parameters

*   `conditionId` (path, string, required) The Id of the condition.  
    Maximum length: 256. Example: `NameCondition`.
*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **200** Condition retrieved successfully.
    
    Media type: `application/json`. Schema: `Condition`.
    
    _Example: GetConditionByID_
    
    ```
    {
      "id": "NameCondition",
      "attributeKey": "name",
      "attributeValue": [
        "Shirt"
      ],
      "attributeName": "name",
      "operator": "starts_with"
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### PUT Create or update a condition.

`PUT /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}/conditions/{conditionId}`

Operation ID: `createOrUpdateCategoryRuleCondition`. Security: AmOAuth2 (sfcc.catalogs.rw).

Create or update a condition.

#### Parameters

*   `conditionId` (path, string, required) The Id of the condition.  
    Maximum length: 256. Example: `NameCondition`.
*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `Condition`.

_Example: PutConditionRequestBody_

```
{
  "id": "NameCondition",
  "attributeKey": "brand",
  "attributeValue": [
    "Van Heusen"
  ],
  "operator": "equals"
}
```

#### Responses

*   **200** Condition updated successfully.
    
    Media type: `application/json`. Schema: `Condition`.
    
    _Example: GetConditionByID_
    
    ```
    {
      "id": "NameCondition",
      "attributeKey": "name",
      "attributeValue": [
        "Shirt"
      ],
      "attributeName": "name",
      "operator": "starts_with"
    }
    ```
    
*   **201** Condition created successfully.
    
    Media type: `application/json`. Schema: `Condition`.
    
    _Example: GetConditionByID_
    
    ```
    {
      "id": "NameCondition",
      "attributeKey": "name",
      "attributeValue": [
        "Shirt"
      ],
      "attributeName": "name",
      "operator": "starts_with"
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### DELETE Delete a condition.

`DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/rules/{ruleId}/conditions/{conditionId}`

Operation ID: `deleteCategoryRuleCondition`. Security: AmOAuth2 (sfcc.catalogs.rw).

Delete a condition.

#### Parameters

*   `conditionId` (path, string, required) The Id of the condition.  
    Maximum length: 256. Example: `NameCondition`.
*   `ruleId` (path, string, required) The unique identifier of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `categoryId` (path, CategoryId, required) The ID of the category to be created.
*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Responses

*   **204** No content.
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Resource requested not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getRuleById404: same as DELETE /organizations/{organizationId}/catalogs/{catalogId}/categories/{categoryId}/excluded-products 404 response._
    

### POST Search for catalog categories.

`POST /organizations/{organizationId}/catalogs/{catalogId}/category-search`

Operation ID: `searchCategoriesInCatalog`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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.

#### Parameters

*   `catalogId` (path, CatalogId, required) The ID of the requested catalog.
*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `levels` (query, integer (int32)) The level number.  
    Minimum: 0. Example: `1`.

#### Request body (required)

Media type: `application/json`. Schema: `CatalogCategorySearchRequest`.

_Example: CatalogSearchBody_

```
{
  "start": 0,
  "count": 50,
  "query": {
    "boolQuery": {
      "should": [
        {
          "textQuery": {
            "searchPhrase": "Luggage",
            "fields": [
              "name"
            ]
          }
        }
      ]
    }
  }
}
```

#### Responses

*   **200** Categories searched successfully.
    
    Media type: `application/json`. Schema: `CategorySearchResult`.
    
    _Example: CategorySearchResultExample_
    
    ```
    {
      "limit": 1,
      "hits": [
        {
          "catalogId": "storefront-catalog-en",
          "creationDate": "2019-02-21T22:10:04.000Z",
          "id": "electronics-accessories",
          "lastModified": "2019-02-21T22:10:49.000Z",
          "name": {
            "default": "Accessories"
          },
          "online": false,
          "pageTitle": {
            "default": "Electronics Accessories"
          },
          "parentCategoryId": "electronics",
          "position": 14
        }
      ],
      "query": {
        "termQuery": {
          "fields": [
            "online"
          ],
          "operator": "is",
          "values": [
            "false"
          ]
        }
      },
      "offset": 0,
      "total": 1
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### POST Search for catalogs.

`POST /organizations/{organizationId}/catalog-search`

Operation ID: `searchCatalogs`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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 |

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    

#### Request body (required)

Media type: `application/json`. Schema: `CatalogSearchRequest`.

_Example: CatalogSearchBodyQuery_

```
{
  "query": {
    "termQuery": {
      "fields": [
        "is_storefront_catalog"
      ],
      "operator": "is",
      "values": [
        "true"
      ]
    }
  }
}
```

#### Responses

*   **200** Catalogs searched successfully.
    
    Media type: `application/json`. Schema: `CatalogSearchResult`.
    
    _Example: CatalogSearchResultQuery_
    
    ```
    {
      "limit": 3,
      "hits": [
        {
          "assignedSites": [
            {
              "cartridges": "sitegenesis_storefront_pipelines:sitegenesis_storefront_core:plugin_apple_pay:plugin_facebook:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
              "customerListLink": {
                "customerListId": "Site_1"
              },
              "displayName": {
                "default": "Site Site_1"
              },
              "id": "Site_1",
              "inDeletion": false,
              "storefrontStatus": "online"
            }
          ],
          "categoryCount": 53,
          "creationDate": "2019-02-22T00:11:14.000Z",
          "id": "NavigationCatalog_9430935",
          "lastModified": "2019-02-22T00:11:14.000Z",
          "name": {
            "default": "Root Category"
          },
          "online": true,
          "recommendationCount": 0,
          "rootCategory": "root"
        },
        {
          "assignedSites": [
            {
              "cartridges": "sitegenesis_storefront_controllers:sitegenesis_storefront_core:plugin_apple_pay:plugin_facebook:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
              "customerListLink": {
                "customerListId": "SiteGenesis"
              },
              "displayName": {
                "default": "SiteGenesis"
              },
              "id": "SiteGenesis",
              "inDeletion": false,
              "storefrontStatus": "online"
            }
          ],
          "categoryCount": 66,
          "creationDate": "2019-02-21T22:10:04.000Z",
          "id": "storefront-catalog-en",
          "lastModified": "2019-02-21T22:10:04.000Z",
          "name": {
            "it-IT": "Catalogo dello storefront - IT",
            "default": "Storefront Catalog - EN",
            "fr-FR": "Catalogue de boutique en ligne - FR",
            "zh-CN": "网店目录 - EN",
            "ja-JP": "ストアフロントカタログ - EN"
          },
          "online": true,
          "recommendationCount": 1865,
          "rootCategory": "root"
        },
        {
          "assignedSites": [
            {
              "cartridges": "sitegenesis_storefront_controllers:sitegenesis_storefront_core:plugin_apple_pay:plugin_facebook:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
              "customerListLink": {
                "customerListId": "SiteGenesis"
              },
              "displayName": {
                "default": "SiteGenesisGlobal"
              },
              "id": "SiteGenesisGlobal",
              "inDeletion": false,
              "storefrontStatus": "online"
            }
          ],
          "categoryCount": 42,
          "creationDate": "2019-02-21T22:10:09.000Z",
          "id": "storefront-catalog-non-en",
          "lastModified": "2019-02-21T22:10:09.000Z",
          "name": {
            "it-IT": "Storefront Catalog - Non-EN",
            "default": "Storefront Catalog - Non-EN",
            "fr-FR": "Catalogue de boutique en ligne - Non - EN",
            "zh-CN": "Storefront Catalog - Non-EN",
            "ja-JP": "ストアフロントカタログ - Non-EN"
          },
          "online": true,
          "recommendationCount": 1865,
          "rootCategory": "root"
        }
      ],
      "query": {
        "termQuery": {
          "fields": [
            "is_storefront_catalog"
          ],
          "operator": "is",
          "values": [
            "true"
          ]
        }
      },
      "offset": 0,
      "total": 3
    }
    ```
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

### POST Search for categories within an organization.

`POST /organizations/{organizationId}/category-search`

Operation ID: `searchCategories`. Security: AmOAuth2 (sfcc.catalogs, sfcc.catalogs.rw).

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.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `levels` (query, integer (int32)) The level number.  
    Minimum: 0. Example: `1`.

#### Request body (required)

Media type: `application/json`. Schema: `CategorySearchRequest`.

_Example: CategorySearchBody_

```
{
  "query": {
    "termQuery": {
      "fields": [
        "online"
      ],
      "operator": "is",
      "values": [
        "false"
      ]
    }
  }
}
```

#### Responses

*   **200** Categories searched successfully.
    
    Media type: `application/json`. Schema: `CategorySearchResult`.
    
    _Example CategorySearchResultExample: same as POST /organizations/{organizationId}/catalogs/{catalogId}/category-search 200 response._
    
*   **400** Bad Request. Returned when a specified parameter value is unknown.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCategoryFromCatalog400: same as GET /organizations/{organizationId}/catalogs 400 response._
    
*   **401** Unauthorized. Your Client ID is invalid, or you are not allowed to access the content provided by the requested URL.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog401: same as GET /organizations/{organizationId}/catalogs 401 response._
    
*   **404** Requested resource not found.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example getCatalog404: same as GET /organizations/{organizationId}/catalogs/{catalogId} 404 response._
    

## Schemas

### OrganizationId

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Type: `string`.

Pattern: ^f\_ecom\_\[a-z\]{4}\_(prd|stg|dev|s\[0-9\]{2}|\[0-9\]{3})$. Example: `f_ecom_zzxy_prd`.

### Catalogs

Catalogs allow categories to be organized into hierarchical structures.

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of Catalog_, required) The collection of catalogs.

### ErrorResponse

*   `title` (_string_, required) A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization  
    Maximum length: 256. Example: `You do not have enough credit`.
*   `type` (_string_, required) A URI reference \[RFC3986\] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML \[W3C.REC-html5-20141028\]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `NotEnoughMoney`.
*   `detail` (_string_, required) A human-readable explanation specific to this occurrence of the problem.  
    Example: `Your current balance is 30, but that costs 50`.
*   `instance` (_string_) A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `/account/12345/msgs/abc`.

### CatalogId

The ID of the catalog.

Type: `string`.

Minimum length: 1. Maximum length: 256. Example: `apparel-catalog`.

### Catalog

Document representing a catalog.

*   `assignedProductCount` (_integer (int32)_) The count of products assigned to the catalog. It is read only.  
    Example: `20`.
*   `assignedSites` (_array of Site_) The sites assigned to the catalog. It is read only.
*   `categoryCount` (_integer (int32)_) The category count of catalog. It is read only.  
    Example: `10`.
*   `creationDate` (_string (date-time)_) Returns the value of attribute 'creationDate'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `description` (_object_) The description of catalog.
    
    Additional properties: `string`.
    
*   `id` (_CatalogId_, required)
*   `lastModified` (_string (date-time)_) Returns the value of attribute 'lastModified'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `name` (_object_) The catalog name.
    
    Additional properties: `string`.
    
*   `online` (_boolean_) The online status of catalog.  
    Example: `false`.
*   `ownedProductCount` (_integer (int32)_) The count of products owned by the catalog. It is read only.  
    Example: `100`.
*   `recommendationCount` (_integer (int32)_) The recommendation count of the catalog. It is read only.  
    Example: `50`.
*   `rootCategory` (_string_) The root category of the catalog. It is read only.  
    Maximum length: 256. Example: `apparel-master-catalog`.

Additional properties: `any`.

Additional Property Support

This type supports additional properties passed along with the defined properties of this API. To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.

Example: `c_trackingId`.

### Categories

Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category also can provide a context 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. Linking of categories is also used for Site hierarchical navigation. For example, inside 'Clothing' you may have 'Mens', and inside 'Mens' you may have 'Pants'. Categories are not _Tags_."

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of Category_, required) Category data

### CategoryId

The ID of the category.

Type: `string`.

Minimum length: 1. Maximum length: 256. Example: `mens`.

### Category

Document representing a category.

*   `catalogId` (_object_) The ID of the catalog that contains it.  
    Example: `apparel-catalog`.
    
    Includes all fields of `CatalogId`.
    
    Example: `apparel-catalog`.
    
*   `categories` (_array of Category_) The array of subcategories for the category.
*   `creationDate` (_string (date-time)_) Returns the value of attribute 'creationDate'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `description` (_object_) The localized description of the category.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Mens Clothing Outerwear"
    }
    ```
    
*   `id` (_object_, required) The ID of the category.  
    Example: `mens-clothing-outerwear`.
    
    Includes all fields of `CategoryId`.
    
    Example: `mens-clothing-outerwear`.
    
*   `image` (_string_) The name of the category image. The URL to the image is computed.  
    Minimum length: 1. Maximum length: 256. Example: `Summer Bomber Jacket`.
*   `lastModified` (_string (date-time)_) Returns the value of attribute 'lastModified'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `name` (_object_) The localized name of the category.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Mens Clothing Outerwear"
    }
    ```
    
*   `online` (_boolean_) The online status of the category determines if it is visible in the storefront. Defaults to false if not specified on creation.  
    Example: `true`.
*   `pageDescription` (_object_) The localized page description of the category.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Mens Outerwear Category"
    }
    ```
    
*   `pageKeywords` (_object_) The localized page keywords for the category.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Outerwear"
    }
    ```
    
*   `pageTitle` (_object_) The localized page title of the category.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Mens Clothing Outerwear"
    }
    ```
    
*   `parentCategoryId` (_string_) The ID of the parent category. Defaults to root if not specified on creation.  
    Minimum length: 1. Maximum length: 256. Example: `mens-clothing`.
*   `paths` (_array of PathRecord_) The path record.
*   `position` (_number (double)_) The position of the category determines the display order in the storefront.  
    Example: `3`.
*   `sortingRules` (_array of SortingRule_) The category sorting rules.
*   `thumbnail` (_string_) The name of the category thumbnail. The URL to the thumbnail is computed.  
    Minimum length: 1. Maximum length: 256. Example: `Summer Bomber Jacket Large`.

Additional properties: `any`.

Additional Property Support

This type supports additional properties passed along with the defined properties of this API. To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.

Example: `c_trackingId`.

### SiteId

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites

Type: `string`.

Minimum length: 1. Maximum length: 32. Example: `RefArch`.

### CategoryProductAssignmentSearchRequest

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.

Includes all fields of `SearchRequest`.

_Example_

```
{
  "limit": 4,
  "query": {
    "textQuery": {
      "fields": [
        "id",
        "description"
      ],
      "searchPhrase": "campaign"
    }
  },
  "offset": 2
}
```

### CategoryProductAssignmentSearchResult

Document representing a product search result.

Includes all fields of `PaginatedSearchResult`.

*   `hits` (_array of CategoryProductAssignment_, required) The sorted array of search hits. This array can be empty.

_Example_

```
{
  "value": [
    {
      "limit": 1,
      "hits": [
        {
          "couponId": "MyCoupon",
          "creationDate": "2019-10-20T12:00:00Z",
          "description": "This coupon is used to give 10% off stuff.",
          "enabled": false,
          "exportedCodeCount": 0,
          "lastModified": "2019-10-30T04:23:59Z",
          "redemptionCount": 3,
          "redemptionLimits": {
            "limitPerCode": 1,
            "limitPerCustomer": 1,
            "limitPerTimeFrame": {
              "limit": 2,
              "redemptionTimeFrame": 24
            }
          },
          "singleCode": "MyCode",
          "systemCodesConfig": {
            "codePrefix": "SG",
            "numberOfCodes": 500000
          },
          "totalCodesCount": 50,
          "type": "single_code"
        }
      ],
      "query": {
        "textQuery": {
          "fields": [
            "id",
            "description"
          ],
          "searchPhrase": "stuff"
        }
      },
      "sorts": [
        {
          "field": "couponId",
          "sortOrder": "desc"
        }
      ],
      "offset": 2,
      "total": 8
    }
  ]
}
```

### ProductId

The id (SKU) of the product.

Type: `string`.

Minimum length: 1. Maximum length: 100. Example: `apple-ipod-classic`.

### CategoryProductAssignment

Document representing a category product assignment.

*   `catalogId` (_object_, required) The ID of the catalog.  
    Example: `apparel-catalog`.
    
    Includes all fields of `CatalogId`.
    
    Example: `apparel-catalog`.
    
*   `categoryId` (_object_, required) The ID of the category.  
    Example: `mens`.
    
    Includes all fields of `CategoryId`.
    
    Example: `mens`.
    
*   `creationDate` (_string (date-time)_) Returns the value of attribute 'creationDate'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `lastModified` (_string (date-time)_) Returns the value of attribute 'lastModified'. It is read only.  
    Maximum length: 30. Example: `253402214400`.
*   `owningCatalogName` (_object_) The name of the catalog that owns the product.
    
    Additional properties: `string`.
    
*   `position` (_number (double)_) The position of product category assignment.  
    Example: `2`.
*   `product` (_Product_)
*   `productId` (_ProductId_, required)
*   `productName` (_object_) The name of the product.
    
    _Example_
    
    ```
    {
      "default": "Summer Bomber Jacket"
    }
    ```
    

### Limit

Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).

Type: `integer (int32)`.

Default: `10`. Minimum: 1. Example: `10`.

### Offset

The zero-based index of the first hit/data to include in the result.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `0`.

### ExecutionJobStatusResult

The status of the execution job.

*   `type` (_string_) The type of execution job.  
    Allowed values: `evaluation`, `execution`. Example: `evaluation`.
*   `assignedCount` (_integer_) Indicates total number of products assigned by the execution job.  
    Example: `100`.
*   `unassignedCount` (_integer_) Indicates total number of products unassigned by the execution job.  
    Example: `100`.
*   `matchedCount` (_integer_) Indicates total number of products evaluated and matched by the evaluation job.  
    Example: `100`.
*   `jobStatus` (_string_, required) Indicates the status of the rules execution job (that is, indicates whether the job completed successfully or an error occurred).  
    Allowed values: `inProgress`, `success`, `error`, `unavailable`. Example: `success`.
*   `message` (_string_) A description of any errors, failures, and exceptions that caused the job to fail.  
    Example: `Job execution failed to start.`.
*   `lastRunDate` (_string (date-time)_) The date that the rules categorization job was last run for given catalog and category.  
    Maximum length: 30. Example: `253402214400`.
*   `productIds` (_array of string_) The list of matched product IDs returned by the execution job.  
    Items: Maximum length: 256. Example: `apple-ipod-classic`.
    
    _Example_
    
    ```
    [
      25772717,
      25772792
    ]
    ```
    
*   `limit` (_Limit_)
*   `offset` (_Offset_)

### ExecutionRequest

The document representing the execution Request for categorization.

*   `evaluation` (_boolean_, required) A flag indicating whether only an evaluation job needs to be performed.  
    Default: `true`. Example: `true`.

### ExcludedProductsResult

The list of excluded products.

*   `limit` (_Limit_, required)
*   `data` (_array of ExcludedProduct_) The list of the excluded products. This can be empty.
*   `total` (_Total_, required)

### ExcludedProductRequest

The excluded product record

*   `data` (_array of ExcludedProduct_, required) The list of the excluded products.

### RulesResult

Result document containing an array of rules.

Includes all fields of `ResultBase`.

*   `data` (_array of Rule_) The list of rules. This can be empty. _Note_ - If the exclusion attribute is set to true, the rule is designated as an Exclusion rule. Any item matching an Exclusion rule is omitted from the final result set.

### RulesRequest

Request document containing an array of rules for saving multiple rules.

*   `data` (_array of Rule_) The list of rules. This can be empty.

### Rule

Document representing a categorization rule.

*   `id` (_string_, required) The ID of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `enabled` (_boolean_, required) A flag indicating whether this rule is enabled.  
    Default: `false`. Example: `false`.
*   `exclusion` (_boolean_, required) A flag indicating whether this rule is an exclusion.  
    Default: `false`. Example: `false`.
*   `categorizationLocaleId` (_string_) This field indicates the locale to be used for evaluating rules/conditions for the entire category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Maximum length: 10. Example: `en-US`.
*   `categorizationClassificationFlag` (_boolean_) This field indicates if the matching products assigned as a result of the rules run will be given the tag for classification category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Default: `false`. Example: `true`.
*   `categorizationPrimaryFlag` (_boolean_) This field indicates if the matching products assigned as a result of the rules run will be given the tag for primary category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Default: `false`. Example: `true`.
*   `conditions` (_array of Condition_) The list of conditions for the rule.

### RuleRequest

This document represents the request body while creating a rule.

*   `id` (_string_, required) The ID of the rule.  
    Maximum length: 256. Example: `VHRule`.
*   `enabled` (_boolean_, required) A flag indicating whether this rule is enabled.  
    Default: `false`. Example: `false`.
*   `exclusion` (_boolean_, required) A flag indicating whether this rule is an exclusion.  
    Default: `false`. Example: `false`.
*   `categorizationLocaleId` (_string_) This field indicates the locale to be used for evaluating rules/conditions for the entire category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Maximum length: 10. Example: `en-US`.
*   `categorizationClassificationFlag` (_boolean_) This field indicates if the matching products assigned as a result of the rules run will be given the tag for classification category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Default: `false`. Example: `true`.
*   `categorizationPrimaryFlag` (_boolean_) This field indicates if the matching products assigned as a result of the rules run will be given the tag for primary category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.  
    Default: `false`. Example: `true`.

### ConditionsResult

Result document containing an array of conditions.

*   `limit` (_Limit_, required)
*   `conditions` (_array of Condition_) The list of conditions for a rule. This can be empty.
*   `total` (_Total_, required)

### Condition

Document representing a condition.

*   `id` (_string_, required) The ID of the condition.  
    Maximum length: 256. Example: `NameCondition`.
*   `attributeKey` (_string_, required) The key of the attribute(system or custom). This represents the ID of the attribute.  
    Maximum length: 256. Example: `name`.
*   `attributeName` (_string_) The human-readable name of the attribute(system or custom). This is a read-only field.  
    Maximum length: 4000. Example: `name`.
*   `attributeValue` (_array of string_, required) Array of attribute values.
    
    Each item: The value of the attribute.
    
      
    Items: Maximum length: 4000. Example: `someValue`.
    
    _Example_
    
    ```
    [
      "Shirt"
    ]
    ```
    
*   `operator` (_string_, required) The operator for the condition.  
    Allowed values: `starts_with`, `contains`, `equals`, `not_equals`, `greater_than`, `less_than`, `is_one_of`, `not_one_of`, `is_defined`, `is_not_defined`. Example: `starts_with`.

### CatalogCategorySearchRequest

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.

Includes all fields of `SearchRequest`.

_Example_

```
{
  "limit": 4,
  "query": {
    "textQuery": {
      "fields": [
        "id",
        "description"
      ],
      "searchPhrase": "campaign"
    }
  },
  "offset": 2
}
```

### CategorySearchResult

Document representing a catalog search result.

Includes all fields of `PaginatedSearchResult`.

*   `hits` (_array of Category_, required) The sorted array of search hits. Can be empty.

_Example_

```
{
  "value": [
    {
      "limit": 1,
      "hits": [
        {
          "couponId": "MyCoupon",
          "creationDate": "2019-10-20T12:00:00Z",
          "description": "This coupon is used to give 10% off stuff.",
          "enabled": false,
          "exportedCodeCount": 0,
          "lastModified": "2019-10-30T04:23:59Z",
          "redemptionCount": 3,
          "redemptionLimits": {
            "limitPerCode": 1,
            "limitPerCustomer": 1,
            "limitPerTimeFrame": {
              "limit": 2,
              "redemptionTimeFrame": 24
            }
          },
          "singleCode": "MyCode",
          "systemCodesConfig": {
            "codePrefix": "SG",
            "numberOfCodes": 500000
          },
          "totalCodesCount": 50,
          "type": "single_code"
        }
      ],
      "query": {
        "textQuery": {
          "fields": [
            "id",
            "description"
          ],
          "searchPhrase": "stuff"
        }
      },
      "sorts": [
        {
          "field": "couponId",
          "sortOrder": "desc"
        }
      ],
      "offset": 2,
      "total": 8
    }
  ]
}
```

### CatalogSearchRequest

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.

Includes all fields of `SearchRequest`.

_Example_

```
{
  "limit": 4,
  "query": {
    "textQuery": {
      "fields": [
        "id",
        "description"
      ],
      "searchPhrase": "campaign"
    }
  },
  "offset": 2
}
```

### CatalogSearchResult

Document representing a catalog search result.

Includes all fields of `PaginatedSearchResult`.

*   `hits` (_array of Catalog_, required) The sorted array of catalog search hits. Can be empty.

_Example_

```
{
  "value": [
    {
      "limit": 1,
      "hits": [
        {
          "couponId": "MyCoupon",
          "creationDate": "2019-10-20T12:00:00Z",
          "description": "This coupon is used to give 10% off stuff.",
          "enabled": false,
          "exportedCodeCount": 0,
          "lastModified": "2019-10-30T04:23:59Z",
          "redemptionCount": 3,
          "redemptionLimits": {
            "limitPerCode": 1,
            "limitPerCustomer": 1,
            "limitPerTimeFrame": {
              "limit": 2,
              "redemptionTimeFrame": 24
            }
          },
          "singleCode": "MyCode",
          "systemCodesConfig": {
            "codePrefix": "SG",
            "numberOfCodes": 500000
          },
          "totalCodesCount": 50,
          "type": "single_code"
        }
      ],
      "query": {
        "textQuery": {
          "fields": [
            "id",
            "description"
          ],
          "searchPhrase": "stuff"
        }
      },
      "sorts": [
        {
          "field": "couponId",
          "sortOrder": "desc"
        }
      ],
      "offset": 2,
      "total": 8
    }
  ]
}
```

### CategorySearchRequest

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.

Includes all fields of `SearchRequest`.

_Example_

```
{
  "limit": 4,
  "query": {
    "textQuery": {
      "fields": [
        "id",
        "description"
      ],
      "searchPhrase": "campaign"
    }
  },
  "offset": 2
}
```

### PaginatedResultBase

Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. If you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.

Includes all fields of `ResultBase`.

*   `offset` (_Offset_, required)

### Site

Document representing a site.

*   `cartridges` (_string_) The cartridge path of the site.  
    Example: `sitegenesis_storefront_controllers:sitegenesis_storefront_core`.
*   `customerListLink` (_object_) Document representing a link to a customer list.
    *   `customerListId` (_string_, required) The customerList ID.  
        Maximum length: 256. Example: `SiteGenesis`.
    *   `title` (_object_) The link title.
        
        Additional properties: `string`.
        
*   `description` (_object_) The description of this site.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "default": "Prototypical site used for starting point"
    }
    ```
    
*   `displayName` (_object_, required) The display name entered by the user.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "default": "Site Genesis"
    }
    ```
    
*   `id` (_SiteId_, required)
*   `inDeletion` (_boolean_) The deletion status of this site, true if in deletion.  
    Example: `false`.
*   `storefrontStatus` (_string_) The storefront status of the site, it can be optionally be set to online, maintenance, to\_be\_deleted, and protected.  
    Allowed values: `online`, `maintenance`, `to_be_deleted`, `protected`. Example: `online`.

### PathRecord

Document representing most basic info (ID and name) of a category or catalog.

*   `id` (_object_) The ID of the category path.  
    Example: `mens-clothing`.
    
    Includes all fields of `CategoryId`.
    
    Example: `mens-clothing`.
    
*   `name` (_object_) The name of the category path.
    
    Additional properties: `string`.
    

Additional properties: `any`.

Additional Property Support

This type supports additional properties passed along with the defined properties of this API. To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.

Example: `c_trackingId`.

### SortingRule

Document representing a product sorting rule.

*   `creationDate` (_string (date-time)_) The creation date, read only.  
    Maximum length: 30. Example: `253402214400`.
*   `description` (_string_) The description of the product sorting rule.  
    Maximum length: 4000. Example: `Sorts by price descending`.
*   `id` (_string_) The ID of the product sorting rule.  
    Maximum length: 256. Example: `price-high-to-low`.
*   `productSortingRuleSteps` (_array of SortingRuleStep_) The steps involved in sorting by this rule.
*   `ruleContext` (_string_) The context of the rule, either site or global.  
    Allowed values: `site`, `global`. Example: `site`.
*   `site` (_SiteId_)

Additional properties: `any`.

Additional Property Support

This type supports additional properties passed along with the defined properties of this API. To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.

Example: `c_trackingId`.

### SearchRequest

Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.

*   `limit` (_integer (int32)_) Maximum records to retrieve per request, not to exceed 200.  
    Minimum: 1. Maximum: 200. Example: `10`.
*   `query` (_Query_, required)
*   `sorts` (_array of Sort_) The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.
*   `offset` (_Offset_)

### PaginatedSearchResult

Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.

Includes all fields of `PaginatedResultBase`.

*   `query` (_Query_, required)
*   `sorts` (_array of Sort_) The sorting that was applied to the result.
*   `hits` (_array of object_) The sorted array of search hits. Can be empty.

_Example_

```
{
  "limit": 1,
  "hits": [
    {
      "couponId": "coupon1",
      "creationDate": "2019-10-20T12:00:00Z",
      "description": "This coupon is used to give 10% off stuff.",
      "enabled": false,
      "exportedCodeCount": 0,
      "lastModified": "2019-10-30T04:23:59Z",
      "redemptionCount": 3,
      "redemptionLimits": {
        "limitPerCode": 1,
        "limitPerCustomer": 1,
        "limitPerTimeFrame": {
          "limit": 2,
          "redemptionTimeFrame": 24
        }
      },
      "singleCode": "MyCode",
      "systemCodesConfig": {
        "codePrefix": "SG",
        "numberOfCodes": 500000
      },
      "totalCodesCount": 50,
      "type": "single_code"
    }
  ],
  "query": {
    "textQuery": {
      "fields": [
        "id",
        "description"
      ],
      "searchPhrase": "stuff"
    }
  },
  "sorts": [
    {
      "field": "couponId",
      "sortOrder": "desc"
    }
  ],
  "offset": 2,
  "total": 8
}
```

### Product

Any product that is sold, shown alone, and does not have variations such as different sizes or colors. Product that has no reliance on any other product for inheritance. _A product has a SKU and can have a product option, which has a different SKU_.

*   `assignedCategories` (_array of CatalogCategoryId_) The catalog categories that the product is assigned to. It is read only.
*   `ats` (_number (double)_) The Available To Sell (ATS) inventory value of the product. This is a calculated value.  
    Example: `15`.
*   `brand` (_string_) The brand of the product.  
    Example: `Apple`.
*   `bundledProducts` (_array of Product_) The array of bundled products which the product includes. It is read only.
*   `classificationCategory` (_CatalogCategoryId_)
*   `creationDate` (_string (date-time)_) Returns the value of attribute 'creationDate'. It is read only.  
    Example: `253402214400`.
*   `defaultVariantId` (_string_) The ID of the product's default variant. It is read only.  
    Example: `apple-ipod-classic-8gb-black`.
*   `ean` (_string_) The European Article Number of the product.  
    Example: `ksdf69w4`.
*   `id` (_ProductId_, required)
*   `image` (_MediaFile_)
*   `imageGroups` (_array of ImageGroup_) The array of product image groups. It is read only.
*   `inStock` (_boolean_) The flag that indicates if the product is in stock, or not. This is a calculated value.  
    Example: `true`.
*   `lastModified` (_string (date-time)_) Returns the value of attribute 'lastModified'. It is read only.  
    Example: `253402214400`.
*   `localizedTaxClassId` (_object_) The localized tax class identifier of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "exempt"
    }
    ```
    
*   `longDescription` (_object_) The localized long description of the product.
    
    Additional properties: `MarkupText`.
    
*   `manufacturerName` (_string_) The name of the product's manufacturer.  
    Example: `Apple`.
*   `manufacturerSku` (_string_) The SKU of the product's manufacturer.  
    Example: `HSD68J`.
*   `master` (_Master_)
*   `name` (_object_) The localized name of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Apple Ipod Classic"
    }
    ```
    
*   `online` (_boolean_) The flag that indicates if the product is online, or not. This is a calculated value.  
    Example: `true`.
*   `onlineFlag` (_object_) The site-specific online status of the product.
    
    Additional properties: `boolean`.
    
    _Example_
    
    ```
    {
      "Site1": true
    }
    ```
    
*   `owningCatalogId` (_string_) The ID of the catalog that owns the product.  
    Example: `apple-master-catalog`.
*   `owningCatalogName` (_object_) The localized name of the catalog that owns the product. It is read only.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Apple Master Catalog"
    }
    ```
    
*   `pageDescription` (_object_) The localized page description of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Page Description"
    }
    ```
    
*   `pageKeywords` (_object_) The localized page keywords of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Keywords"
    }
    ```
    
*   `pageTitle` (_object_) The localized page title of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Page Title"
    }
    ```
    
*   `price` (_number (double)_) The price of the product.  
    Example: `219.99`.
*   `priceCurrency` (_string_) The currency code for a product's price.  
    Example: `USD`.
*   `pricePerUnit` (_number (double)_) The price per unit of the product. This is a read only field.  
    Example: `1`.
*   `primaryCategories` (_array of CatalogCategoryId_) The primary catalog categories that the product is assigned to. It is read only.
*   `primaryCategoryId` (_string_) The ID of the products primary category. This is a read only field. It is read only.  
    Example: `electronics-media-players`.
*   `productBundles` (_array of Product_) The array of product bundles which the product belongs to. It is read only.
*   `productOptions` (_array of ProductOption_) The array of product options. This is applicable for products of type "option". It is read only.
*   `productSets` (_array of Product_) The array of product sets which the product belongs to. It is read only.
*   `searchable` (_object_) The site-specific searchable status of the product.
    
    Additional properties: `boolean`.
    
    _Example_
    
    ```
    {
      "Site1": true
    }
    ```
    
*   `setProducts` (_array of Product_) The array of set products which the product includes. It is read only.
*   `shortDescription` (_object_) The localized short description of the product.
    
    Additional properties: `MarkupText`.
    
*   `taxClassId` (_string_) The tax class identifier of the product.  
    Example: `standard`.
*   `type` (_ProductType_)
*   `unit` (_string_) The sales unit of the product.  
    Example: `single`.
*   `unitMeasure` (_string_) The unitMeasure of the product.  
    Example: `each`.
*   `unitQuantity` (_number (double)_) The unitQuantity of the product.  
    Example: `15`.
*   `upc` (_string_) The Universal Product Code (UPC) of the product.  
    Example: `66JSD88JASD`.
*   `validFrom` (_object_) The valid/online from date of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "default@SiteGenesis": "2000-05-11T00:00:00.000Z"
    }
    ```
    
*   `validTo` (_object_) The valid/online to date of the product.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "default@SiteGenesis": "2050-05-11T00:00:00.000Z"
    }
    ```
    
*   `variants` (_array of Variant_) The array of variants of the product. This is applicable for product types "master" and "variationGroup" only. It is read only.
*   `variationAttributes` (_array of VariationAttribute_) The sorted array of variation attributes assigned to the product. This is applicable for product types "master", "variationGroup" and "variant" only. It is read only.
*   `variationGroups` (_array of VariationGroup_) The array of variation groups in the product. This is applicable for product type "master" only. It is read only.
*   `variationValues` (_object_) The variation values selected for the product in variation attribute id and value pairs. This is applicable for product types "Variant" and "VariationGroup" only. It is read only.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "color": "red",
      "size": "8gb"
    }
    ```
    

### ExcludedProduct

The excluded product record.

*   `productId` (_ProductId_, required)

### Total

The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `10`.

### ResultBase

Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.

*   `limit` (_integer (int32)_, required) Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.  
    Example: `10`.
*   `total` (_Total_, required)

### SortingRuleStep

Document representing a product sorting rule step.

*   `attributeId` (_string_) The ID for sorting attribute.  
    Maximum length: 256. Example: `price`.
*   `direction` (_string_) The direction of the sorting attribute.  
    Allowed values: `asc`, `desc`. Example: `desc`.
*   `isSystem` (_boolean_) Whether or not the attribute is a system attribute.  
    Example: `false`.
*   `position` (_integer (int32)_) The position of product sorting rule step.  
    Example: `1`.
*   `textRelevanceIncluded` (_boolean_) The text relevance included.  
    Example: `true`.
*   `typeId` (_string_) The sorting type for sorting attribute.  
    Maximum length: 256. Example: `price`.

Additional properties: `any`.

Additional Property Support

This type supports additional properties passed along with the defined properties of this API. To indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`. The type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.

Example: `c_trackingId`.

### Query

A set of objects that define criteria used to select records. A query can contain one of the following:

*   `MatchAllQuery`

*   Matches all documents.

*   `TermQuery`

*   Matches one or more documents against one or more document fields.

*   `TextQuery`

*   Matches text against one or more fields.

*   `BoolQuery`

*   Allows construction of a logical expression of multiple queries.

*   `FilteredQuery`

*   Allows a filter to be applied to a query.

*   `NestedQuery`

*   Allows you to query on nested documents.
*   _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._

Minimum properties: 1. Maximum properties: 1.

*   `boolQuery` (_BoolQuery_)
*   `filteredQuery` (_FilteredQuery_)
*   `matchAllQuery` (_MatchAllQuery_)
*   `nestedQuery` (_NestedQuery_)
*   `termQuery` (_TermQuery_)
*   `textQuery` (_TextQuery_)

_Example_

```
{
  "filteredQuery": {
    "query": {
      "textQuery": {
        "fields": [
          "couponId"
        ],
        "searchPhrase": "disabled"
      }
    },
    "filter": {
      "termFilter": {
        "field": "enabled",
        "operator": "is",
        "values": [
          false
        ]
      }
    }
  }
}
```

### Sort

Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.

*   `field` (_string_, required) The name of the field to sort on.  
    Maximum length: 256. Example: `couponId`.
*   `sortOrder` (_string_) The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.  
    Allowed values: `asc`, `desc`. Default: `asc`. Example: `asc`.

_Example_

```
{
  "field": "couponId",
  "sortOrder": "desc"
}
```

### CatalogCategoryId

Document representing a catalog category ID.

*   `catalogId` (_CatalogId_, required)
*   `categoryId` (_CategoryId_, required)

### MediaFile

Document representing media file.

*   `absUrl` (_string_) The absolute URL with request protocol.  
    Example: `https://www.example-image.com/images/apple-ipod-classic.jpg`.
*   `alt` (_object_) The alternative image text.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "iPod"
    }
    ```
    
*   `disBaseUrl` (_string_) The Dynamic Image Service (DIS) base URL for product images only.  
    Example: `https://www.dis-base-url/images/apple-ipod-clasic.jpg`.
*   `path` (_string_, required) The raw media file path.  
    Example: `/images/apple-ipod-classic.jpg`.
*   `title` (_object_) The image title.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "iPod"
    }
    ```
    

### ImageGroup

Document representing an image group containing a list of images for a particular view type and an optional variation value.

*   `images` (_array of MediaFile_, required) The images of the image group.
*   `variationAttributes` (_array of VariationAttribute_) Returns a list of variation attributes applying to this image group.
*   `viewType` (_string_, required) The image view type.  
    Example: `hi-res`.

### MarkupText

Document representing markup text.

*   `markup` (_string_, required) The rendered HTML.
*   `source` (_string_, required) The raw markup text.

### Master

Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for it's product variants, and is used for navigation. _Does'nt have a SKU._

*   `masterId` (_ProductId_, required)
*   `orderable` (_boolean_) A flag indicating whether at least one of the variants is orderable.  
    Example: `true`.
*   `price` (_number (double)_) The minimum sales price of the related variants.  
    Example: `199.99`.
*   `priceMax` (_number (double)_) The maximum sales of related variants.  
    Example: `219.99`.
*   `prices` (_object_) prices
    
    Additional properties: `number (double)`.
    

### ProductOption

Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can't be purchased separately.

*   `customName` (_object_) The localized custom name of the product option.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Warranty"
    }
    ```
    
*   `defaultProductOptionValue` (_string_) The default product option value.  
    Example: `5-years`.
*   `description` (_object_) The localized description of the product option.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Option Description"
    }
    ```
    
*   `id` (_string_, required) The object attribute definition ID which is also the identifier for the product option.  
    Minimum length: 1. Example: `warranty`.
*   `image` (_MediaFile_)
*   `name` (_string_) The name of the object attribute definition.  
    Example: `Warranty`.
*   `selectedOptionValue` (_string_) The selected option value of the product option.  
    Example: `2-years`.
*   `shared` (_boolean_) The flag that indicates if the product option is shared or local.  
    Example: `false`.
*   `sortingMode` (_string_) The sorting mode for the product option values.  
    Allowed values: `byexplicitorder`, `byoptionprice`. Example: `byoptionprice`.
*   `values` (_array of ProductOptionValue_) The sorted array of values of the product option.

### ProductType

Document representing a product type.

*   `bundle` (_boolean_) A flag indicating whether the product is a bundle.  
    Example: `false`.
*   `bundled` (_boolean_) A flag indicating whether the product is bundled.  
    Example: `false`.
*   `item` (_boolean_) A flag indicating whether the product is a standard item.  
    Example: `false`.
*   `master` (_boolean_, required) A flag indicating whether the product is a master.  
    Example: `true`.
*   `option` (_boolean_) A flag indicating whether the product is an option.  
    Example: `false`.
*   `partOfProductSet` (_boolean_) A flag indicating whether the product is part of product set.  
    Example: `false`.
*   `partOfRetailSet` (_boolean_) A flag indicating whether the product is part of retail set.  
    Example: `false`.
*   `retailSet` (_boolean_) A flag indicating whether the product is a retail set.  
    Example: `false`.
*   `set` (_boolean_) A flag indicating whether the product is a set.  
    Example: `false`.
*   `variant` (_boolean_) A flag indicating whether the product is a variant.  
    Example: `false`.
*   `variationGroup` (_boolean_) A flag indicating whether the product is a variation group.  
    Example: `false`.

### Variant

A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. _Has a SKU_

*   `ats` (_number (double)_) The Available To Sell (ATS) inventory value of the product. This is a calculated value.  
    Example: `10`.
*   `defaultProductVariation` (_boolean_) A flag indicating whether the variant is a default variant.  
    Example: `true`.
*   `image` (_MediaFile_)
*   `inStock` (_boolean_) True if the product is in stock, false if not.  
    Example: `true`.
*   `online` (_boolean_) If the product is currently online. True if online, false if not.  
    Example: `true`.
*   `orderable` (_boolean_) A flag indicating whether the variant is orderable.  
    Example: `true`.
*   `price` (_number (double)_) The sales price of the variant.  
    Example: `29.99`.
*   `priceCurrency` (_string_) Currency code for the price of the product.  
    Example: `USD`.
*   `productId` (_ProductId_, required)
*   `searchable` (_object_) A flag indicating whether the variant is searchable.
    
    Additional properties: `boolean`.
    
    _Example_
    
    ```
    {
      "Site1": true
    }
    ```
    
*   `variationAttributes` (_array of VariationAttribute_) Variation attributes.
*   `variationValues` (_object_) The actual variation attribute ID - value pairs.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "color": "black"
    }
    ```
    

### VariationAttribute

Document representing a variation attribute.

*   `attributeDefinitionId` (_string_, required) The id of the requested attribute definition.  
    Example: `color`.
*   `attributeDefinitionName` (_object_) The localized display name of the variation attribute definition.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Color"
    }
    ```
    
*   `defaultValue` (_string_) Default variation attribute value.  
    Example: `black`.
*   `id` (_string_) The ID of the variation attribute.  
    Minimum length: 1. Example: `color`.
*   `name` (_object_) The localized display name of the variation attribute.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Color"
    }
    ```
    
*   `shared` (_boolean_) Returns the value of attribute 'shared' if attribute is local or shared.  
    Example: `false`.
*   `slicing` (_boolean_) Returns the value of attribute 'slicing'.  
    Example: `true`.
*   `values` (_array of VariationAttributeValue_) The sorted array of variation values. This array can be empty.
*   `variationAttributeType` (_string_) Variation attribute type.  
    Allowed values: `string`, `int`, `unknown`. Example: `string`.

### VariationGroup

Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for it's product variants, and is used for navigation. _Doesn't have a SKU._

*   `orderable` (_boolean_) A flag indicating whether the variation group is orderable.  
    Example: `true`.
*   `price` (_number (double)_) The sales price of the variation group.  
    Example: `229.99`.
*   `productId` (_string_, required) The ID (SKU) of the variation group.  
    Minimum length: 1. Maximum length: 100. Example: `apple-ipod-classic-black`.
*   `variationValues` (_object_) The actual variation attribute ID - value pairs.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "color": "red"
    }
    ```
    

### BoolQuery

A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:

*   `must`, which combines as an `AND` operator.
*   `should`, which combines as an `OR` operator.
*   `must_not`, which combines as a `NOT` operator.

If `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:

```
(must-1 AND must-1 AND ...)
  AND (should-1 OR should-2 OR ...)
  AND NOT (must_not-1 OR must_not-2 OR ...)
```

*   `must` (_array of Query_) List of queries to be evaluated as an `AND` operator.
*   `mustNot` (_array of Query_) List of queries to be evaluated as a `NOT` operator.
*   `should` (_array of Query_) List of queries to be evaluated as an `OR` operator.

_Example_

```
{
  "must": [
    {
      "textQuery": {
        "fields": [
          "couponId"
        ],
        "searchPhrase": "DEAL"
      }
    },
    {
      "textQuery": {
        "fields": [
          "description"
        ],
        "searchPhrase": "Big bargain deal"
      }
    }
  ],
  "mustNot": [
    {
      "termQuery": {
        "fields": [
          "enabled"
        ],
        "operator": "is",
        "values": [
          false
        ]
      }
    }
  ]
}
```

### FilteredQuery

Allows to filter the result of a possibly complex query using a possibly complex filter.

*   `filter` (_Filter_, required)
*   `query` (_Query_, required)

_Example_

```
{
  "query": {
    "textQuery": {
      "fields": [
        "couponId"
      ],
      "searchPhrase": "disabled"
    }
  },
  "filter": {
    "termFilter": {
      "field": "enabled",
      "operator": "is",
      "values": [
        false
      ]
    }
  }
}
```

### MatchAllQuery

Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints.

### NestedQuery

Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints.

A `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.

*   `path` (_string_, required) The path to the nested document.  
    Maximum length: 2048. Example: `order.shippingAddresses`.
*   `query` (_Query_, required)
*   `scoreMode` (_string_) Indicates how scores for matching child objects affect the root parent document’s relevance score.  
    Allowed values: `avg`, `total`, `max`, `none`. Example: `avg`.

_Example_

```
{
  "path": "order.shippingAddresses",
  "query": {
    "boolQuery": {
      "must": [
        {
          "boolQuery": {
            "must": [
              {
                "termQuery": {
                  "fields": [
                    "order.shippingAddresses.firstName"
                  ],
                  "operator": "is",
                  "values": [
                    "John"
                  ]
                }
              }
            ]
          }
        },
        {
          "boolQuery": {
            "must": [
              {
                "termQuery": {
                  "fields": [
                    "order.shippingAddresses.lastName"
                  ],
                  "operator": "is",
                  "values": [
                    "Doe"
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "scoreMode": "avg"
}
```

### TermQuery

A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.

**Limitations:**

*   The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.
*   A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.

*   `fields` (_array of Field_, required) The document fields that the values are matched against, combined with the operator.  
    Minimum items: 1.
*   `operator` (_string_, required) Returns the operator to use for the term query.  
    Allowed values: `is`, `one_of`, `is_null`, `is_not_null`, `less`, `greater`, `not_in`, `neq`. Example: `is`.
*   `values` (_array of string | number | boolean | integer_) The values that the fields are compared against, combined with the operator.  
    Items: Example: `myCouponId`.

### TextQuery

A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.

*   `fields` (_array of Field_, required) The document fields that the search phrase matches against.  
    Minimum items: 1.
*   `searchPhrase` (_string_, required) A search phrase, which can include multiple terms separated by spaces.  
    Example: `campaign summer`.

_Example_

```
{
  "fields": [
    "couponId"
  ],
  "searchPhrase": "limit"
}
```

### ProductOptionValue

Document representing a product option Value

*   `defaultProductOptionValue` (_boolean_) Flag indicating if the product option value is the default value for the product option.  
    Example: `true`.
*   `id` (_string_, required) The ID of the product option value.  
    Minimum length: 1. Example: `5-year`.
*   `optionPrices` (_array of Money_) The list of prices in the product option value.
*   `skuExtension` (_string_) The SKU extension of the product option value.  
    Example: `extension`.
*   `value` (_object_, required) The localized value of the product option.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "5 Year Warranty"
    }
    ```
    

### VariationAttributeValue

Document representing a variation attribute value.

*   `description` (_object_) The localized description of the variation value.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "en_US": "Red"
    }
    ```
    
*   `image` (_MediaFile_)
*   `imageSwatch` (_MediaFile_)
*   `name` (_object_) The localized display name of the variation value.
    
    Additional properties: `string`.
    
    _Example_
    
    ```
    {
      "color": "Red"
    }
    ```
    
*   `orderable` (_boolean_) A flag indicating whether at least one variant with this variation attribute value is available to sell.  
    Example: `true`.
*   `position` (_number (double)_) The position of the value among all values of a variation attribute.  
    Example: `2`.
*   `value` (_string_, required) The actual variation value.  
    Minimum length: 1. Example: `red`.

### Filter

Contains a set of objects that define criteria used to select records. A filter can contain one of the following:

*   `TermFilter`

*   Matches records where a field (or fields) exactly matches some simple value (including `null`).

*   `RangeFilter`

*   Matches records where a field value lies within a specified range.

*   `Range2Filter`

*   Matches records in a specified range across fields.

*   `QueryFilter`

*   Matches records based on a query.

*   `BoolFilter`

*   Provides filtering of records using a set of filters combined using a logical operator.

Minimum properties: 1. Maximum properties: 1.

*   `boolFilter` (_BoolFilter_)
*   `queryFilter` (_QueryFilter_)
*   `range2Filter` (_Range2Filter_)
*   `rangeFilter` (_RangeFilter_)
*   `termFilter` (_TermFilter_)

### Field

Name of the field. Might be a custom field name prefixed with c\_.

Type: `string`.

Maximum length: 260. Example: `couponId`.

### Money

A combination of a Currency and an amount of that Currency.

*   `currencyMnemonic` (_CurrencyCode_)
*   `value` (_number (double)_) The amount of money for the given currency.  
    Example: `1234.56`.

### BoolFilter

Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.

*   `filters` (_array of Filter_) A list of filters that are logically combined by an operator.
*   `operator` (_string_, required) The logical operator that is used to combine the filters.  
    Allowed values: `and`, `or`, `not`. Example: `and`.

_Example_

```
{
  "operator": "and",
  "filters": [
    {
      "termFilter": {
        "field": "id",
        "operator": "is",
        "values": [
          "myId"
        ]
      }
    },
    {
      "termFilter": {
        "field": "couponId",
        "operator": "is",
        "values": [
          "couponOne"
        ]
      }
    }
  ]
}
```

### QueryFilter

Wraps any query and allows it to be used as a filter.

*   `query` (_Query_, required)

### Range2Filter

Allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.

The first range (R1) is defined by a pair of attributes (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.

The second range (R2) is defined by `fromValue` and `toValue`.

The filter mode specifies the method used to compare the two ranges:

*   `overlap`: R1 overlaps fully or partially with R2.
*   `containing`: R1 contains R2.
*   `contained`: R1 is contained in R2.

The range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.

A range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.

*   `filterMode` (_string_) Compare mode: overlap, containing, or contained.  
    Allowed values: `overlap`, `containing`, `contained`. Default: `overlap`. Example: `overlap`.
*   `fromField` (_object_, required) The field name of the field that starts the first range.  
    Example: `validFrom`.
    
    Includes all fields of `Field`.
    
    Example: `validFrom`.
    
*   `fromInclusive` (_boolean_) A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `fromValue` (_any_) The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.  
    Example: `2007-01-01T00:00:00.000Z`.
*   `toField` (_object_, required) The field name of the field that ends the first range.  
    Example: `validTo`.
    
    Includes all fields of `Field`.
    
    Example: `validTo`.
    
*   `toInclusive` (_boolean_) A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `toValue` (_any_) The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.  
    Example: `2017-01-01T00:00:00.000Z`.

_Example_

```
{
  "fromField": "validFrom",
  "toField": "validTo",
  "filterMode": "overlap",
  "fromValue": "2007-01-01T00:00:00.000Z",
  "toValue": "2017-01-01T00:00:00.000Z"
}
```

### RangeFilter

Allows you to restrict a search result to hits that have values for a given attribute that fall within a given value range. The range filter supports several value types and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.

A range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.

*   `field` (_object_, required) The search field.  
    Example: `validFrom`.
    
    Includes all fields of `Field`.
    
    Example: `validFrom`.
    
*   `from` (_string (date-time) | integer | number_) The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.
    
    One of: `string (date-time)`, `integer`, `number`.
    
    *   _string (date-time)_
        
        Type: `string (date-time)`.
        
        Example: `2007-01-01T00:00:00.000Z`.
        
    *   _integer_
        
        Type: `integer`.
        
        Example: `1`.
        
    *   _number_
        
        Type: `number`.
        
        Example: `1`.
        
*   `fromInclusive` (_boolean_) A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.
*   `to` (_string (date-time) | integer | number_) The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.
    
    One of: `string (date-time)`, `integer`, `number`.
    
    *   _string (date-time)_
        
        Type: `string (date-time)`.
        
        Example: `2007-01-02T00:00:00.000Z`.
        
    *   _integer_
        
        Type: `integer`.
        
        Example: `2`.
        
    *   _number_
        
        Type: `number`.
        
        Example: `2`.
        
*   `toInclusive` (_boolean_) A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.  
    Default: `true`. Example: `true`.

### TermFilter

Allows you to restrict a search result to hits that match exactly one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criteria you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.

*   `field` (_object_, required) The filter field.
    
    Includes all fields of `Field`.
    
*   `operator` (_string_, required) The operator used to compare the field's values with the given values.  
    Allowed values: `is`, `one_of`, `is_null`, `is_not_null`, `less`, `greater`, `not_in`, `neq`. Example: `is`.
*   `values` (_array of string_) The filter values.  
    Items: Example: `myId`.

_Example_

```
{
  "field": "id",
  "operator": "is",
  "values": [
    "myId"
  ]
}
```

### CurrencyCode

A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.

Type: `string`.

Pattern: ^(\[A-Z\]\[A-Z\]\[A-Z\]|N/A)$. Example: `USD`.