Categories

Each product will belong to one or more categories.

Get all categories

GET /v1/companies/5678/categories Get all categories
GET /v1/companies/5678/sites/6203/categories Get categories for a given site
GET /v1/companies/5678/products/92693/categories Get categories for a given product

  • Note, the updated_at field on this endpoint will return the current timestamp, not the actual last updated timestamp. It is recommended to use webhooks if you want to know when an entity has been updated.

Get a category

GET /v1/companies/5678/categories/8263 Get a category
  • See the list products action to get a category’s products.
  • The show_online flag is used to indicate if this category is shown or hidden. When it is true, Site expects this category should be shown to customers. Otherwise it should be hidden. Hint: Site needs to enable the Online Products feature then edit it under Products > Online Products on Back Office.

  • Note, the updated_at field on this endpoint will return the current timestamp, not the actual last updated timestamp. It is recommended to use webhooks if you want to know when an entity has been updated.

Create a category

POST /v1/companies/5678/categories Create a new category
POST /v1/companies/5678/sites/6203/categories Create a category and add it to a site

Update a category

Use this action to rename a category or change its description or image.

PUT /v1/companies/5678/categories/8263 Update a category
  • See Images for adding/removing images to/from categories by upload.

Add/remove a product to/from a category

PUT /v1/companies/5678/categories/8263/products Add products to a category
DELETE /v1/companies/5678/categories/8263/products/789216 Remove a product from a category
  • You can’t add a variant product to a category or remove a variant from a category.
  • If you changed the categories for a variant template product, all the variant products associated with the variant template will be updated automatically.

List of Webhooks

Here is a list of the supported webhook topics.

categories/created

When a category is created. You will receive the complete category.

categories/updated

When a category is updated. You will receive the complete category after the modifications have been applied.

You also may provide the following attribute filters:

  • show_online

Note that when filtering by show_online, any changes to categories where show_online is true will trigger a webhook notification.

categories/deleted

When a category is deleted. You will receive the complete category.