Catalog - Category trees
The Catalog API manages products, categories, brands, bulk pricing rules, and more. To learn more about catalog resources, see the Catalog overview.
Our Catalog category trees and their categories endpoints are the more modern and performant counterparts to the categories (deprecated) endpoints. Although the category trees endpoints and objects are designed to center an MSF-compatible, multi-tenant category tree architecture, the endpoints work just as well in a single storefront context and support batch requests. Use catalog trees categories endpoints, instead of categories (deprecated) endpoints.
The category trees endpoints let you get the categories for a specific tree, and bulk create, bulk update, and bulk delete categories. You can also bulk update the properties of category trees, which includes changing the channels to which a tree is assigned.
The terms "category tree" and "catalog tree" are used interchangeably throughout the documentation.
To learn more about authenticating Catalog endpoints, locate the Authentication section at the top of each endpoint, then click Show Details.
Resources
Webhooks
Learn more about Category tree webhook events.
Additional Catalog endpoints
Get all category trees
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/treesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id:in in query - arrayFilter by supplying a comma-separated list of category tree IDs.Type: array[integer]
- channel_id:in in query - arrayFilter by supplying a comma-separated list of channel IDs.Type: array[integer]
example
Response
Body
dataarray[object]
example
Upsert category trees
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/treesRequest
Upserts category trees.
This single endpoint updates and creates category trees. If a tree object contains an ID, it is processed as an update operation using that ID. If you do not provide an ID, a new tree is created. The category tree name
field is required to create trees, but is not required on the update.
Usage Notes
- Channel ID in the
channels
field is required to create a category tree. You can only assign a category tree to one channel. - The
channels
field must be absent when updating a category tree. This field is currently unsupported during a category tree update.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
idinteger
namestring
>= 1 characters<= 255 characterschannelsarray[integer]
example
Response
Body
dataarray[object]
example
Delete category trees
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/treesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id:in in query - arrayFilter by supplying a comma-separated list of category tree IDs.Type: array[integer]
example
Response
Get a category tree
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/trees/{tree_id}/categoriesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- tree_id in path - integerrequiredThe ID of the category tree.
- depth in query - integerMax depth for a tree of categories.
example
Response
Body
dataarray[object]
example
See something you can improve? Edit this file on GitHub