Skip to navigation

Upsert Category Trees

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-Tokenstring

OAuth scopes

UI NamePermissionParameter
Productsmodifystore_v2_products
Productsread-onlystore_v2_products_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects a list of objects.
idintegerOptional
namestringOptional1-255 characters
channelslist of integersOptional

Response

Created a category tree.
datalist of objectsOptional
metaobjectOptional
Response metadata.

Errors

403
Forbidden Error
422
Unprocessable Entity Error