Categories tools

list_categories

Lists the categories in your product taxonomy, the structure that powers category-page navigation. For example, a category path might read Home > Clothing > Shoes.

The response gives you every category with its IDs, display name, full path, and domain key. Use site_group_id=-1, the default, for account-level categories, or a specific site group ID for site-level categories. For rule-based categories whose membership is set by conditions, use search_dynamic_categories.

Request parameters

NameTypeRequired?Description
site_group_idstrNoThe site group ID. Use -1 for account-level categories, the default, or a specific site group ID for site-level categories.

Response parameters

The tool returns a CategoriesResponse object with the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[CategoryItem]The categories in the taxonomy.
countintThe total number of categories.
errorstr | nullError message if the request failed.

The CategoryItem object has the following fields:

FieldTypeDescription
idstr | nullThe internal category record ID.
accountIdstr | nullThe account this category belongs to.
siteIdint | nullThe site this category belongs to.
categoryIdstr | nullThe category ID used in search queries.
categoryPathsstr | nullThe full category path, for example Home/Clothing/Shoes.
displayNamestr | nullThe category's display name.
domainKeystr | nullThe domain key this category belongs to.
originalCategoryIdstr | nullThe original category ID from the catalog feed.
extendedCategoryPathlist[ExtendedCategoryPath]The structured category path segments.

The ExtendedCategoryPath object has the following fields:

FieldTypeDescription
idstr | nullThe category path segment ID.
namestr | nullThe category path segment display name.

search_dynamic_categories

Searches the dynamic categories in an account, or fetches one by ID. Dynamic categories are rule-based: their product membership comes from conditions rather than manual curation, so products move in and out as they match the rules.

Omit category_id to list paginated summaries, each with the category's name, associated catalog, conditions, and sync status. Pass category_id to fetch a single category's complete definition, including its condition rules, product IDs, hierarchy paths, catalog association, and sync status. For the manually curated taxonomy, use list_categories.

Request parameters

NameTypeRequired?Description
category_idint | nullNoThe dynamic category ID. Omit to list all dynamic categories; provide to fetch one.
account_namestr | nullNoThe account name. Required if you have access to more than one account.
site_group_idstr | int | nullNoA site group ID or site name. Defaults to the account level (-1).
pageintNoThe page number, zero-based. Defaults to 0. Ignored when category_id is set.
limitintNoThe number of results per page. Defaults to 10. Ignored when category_id is set.
sort_bystrNoThe field to sort by. Defaults to lastModifiedAt. Ignored when category_id is set.
sort_orderstrNoThe sort direction, ASC or DESC. Defaults to DESC. Ignored when category_id is set.
querystr | nullNoA search term to filter categories by name. Ignored when category_id is set.
catalog_namestr | nullNoA catalog name to filter by. Ignored when category_id is set.

Response parameters

The tool returns a DynamicCategoriesResponse when category_id is omitted, or a DynamicCategoryResponse when it's provided.

The DynamicCategoriesResponse object has the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
datalist[DynamicCategorySummary]The dynamic categories in the account.
errorstr | nullError message if the request failed.

The DynamicCategoryResponse object has the following parameters:

ParameterTypeDescription
successboolWhether the request succeeded.
dataDynamicCategorySummary | nullThe full dynamic category record.
errorstr | nullError message if the request failed.

The DynamicCategorySummary object has the following fields:

FieldTypeDescription
idintThe dynamic category's unique ID.
categoryIdstr | nullThe category identifier.
categoryNamestr | nullThe category's display name.
categoryNotestr | nullAn optional note.
catalogNamestr | nullThe associated catalog name.
merchantIdint | nullThe merchant this category belongs to.
groupIdint | nullThe group ID used to group dynamic categories.
createdAtint | nullUnix timestamp in milliseconds of when the category was created.
createdBystr | nullThe user who created the category.
lastModifiedAtint | nullUnix timestamp in milliseconds of the last modification.
lastModifiedBystr | nullThe user who last modified the category.
syncedAtint | nullUnix timestamp in milliseconds of the last sync.
toBeDeletedbool | nullWhether the category is marked for deletion.
productIdslist[str]The product IDs included in this category.
conditionConfigany | nullThe condition rules, as a query and filter configuration.
pathslist[list[CategoryPathNode]] | nullThe category hierarchy paths.

Each entry in the paths field is a list of CategoryPathNode objects, which have the following fields:

FieldTypeDescription
idstr | nullThe category path node ID.
namestr | nullThe category path node display name.


Did this page help you?

© Bloomreach, Inc. All rights reserved.