v1

latestOpenAPI 3.0.12026-07-26381328555.2 KB
Categories

Add Category

Adds a new category to the catalog's category hierarchy. Specify a ParentCategoryID to determine where to locate the category in the hierarchy; if not specified it becomes a top-level category. This current version of the Categories API includes localizedContent to support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the previous API model. If you were a client prior to May 2024 and have upgraded your implementation to support this feature, you can still access category data that has not yet been rewritten to the new model by providing an x-api-version header set to "1".

post/commerce/catalog/admin/categories

Query parameters

incrementSequenceboolean

Sets the sequence number of the category to the current max sequence value plus 1 (e.g. 5 + 1 = 6)

useProvidedIdboolean

If true, the provided Id value will be used as the CategoryId. If omitted or false, the system will generate a CategoryId

responseFieldsstring

limits which fields are returned in the response body

Request body

activeDateEndstring date-time nullable

Active end Date

activeDateStartstring date-time nullable

Active Start Date

catalogIdinteger nullable

The CatalogId that the category belongs to.

categoryCodestring nullable

External unique identifier of the category.

categoryTypestring nullable

The Type of Category Static, Dyanmic, DynamicPreComputed

childCountinteger nullable

Number of subcategories that belong to this category. These subcategories are at the same level (siblings).

idinteger nullable

Internal unique identifier of the category. System-supplied and read-only.

isActiveboolean nullable

If false, the category is considered unavailable in runtime (default is true if not specified on create)

isDisplayedboolean nullable

If true, the category appears to shoppers on the storefront.

parentCategoryCodestring nullable
parentCategoryIdinteger nullable

Unique identifier of the category to which this category belongs. If nil, this is a top-level category. System-supplied and read-only.

parentCategoryNamestring nullable
parentIsActiveboolean nullable
productCountinteger nullable

Number of products contained in this category. This count includes all products contained in any subcategories of this category.

sequenceinteger nullable

Order in which categories appear when they are at the same level (siblings). For example, you could change the sequence of categories so that a specific category always appears first.

shouldSliceboolean nullable

If True, search displays sliced view

Response

OK

activeDateEndstring date-time nullable

Active end Date

activeDateStartstring date-time nullable

Active Start Date

catalogIdinteger nullable

The CatalogId that the category belongs to.

categoryCodestring nullable

External unique identifier of the category.

categoryTypestring nullable

The Type of Category Static, Dyanmic, DynamicPreComputed

childCountinteger nullable

Number of subcategories that belong to this category. These subcategories are at the same level (siblings).

idinteger nullable

Internal unique identifier of the category. System-supplied and read-only.

isActiveboolean nullable

If false, the category is considered unavailable in runtime (default is true if not specified on create)

isDisplayedboolean nullable

If true, the category appears to shoppers on the storefront.

parentCategoryCodestring nullable
parentCategoryIdinteger nullable

Unique identifier of the category to which this category belongs. If nil, this is a top-level category. System-supplied and read-only.

parentCategoryNamestring nullable
parentIsActiveboolean nullable
productCountinteger nullable

Number of products contained in this category. This count includes all products contained in any subcategories of this category.

sequenceinteger nullable

Order in which categories appear when they are at the same level (siblings). For example, you could change the sequence of categories so that a specific category always appears first.

shouldSliceboolean nullable

If True, search displays sliced view