This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.
Index of hierarchical categories used to organize and group products.
Gets the list of categories. (Default sorting is by category id, from lowest to highest.)
GET /stores/{store_hash}/v2/categories
Filter parameters can be added to the URL query string to select specific categories in the collection.
Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 categories are returned by default.
Example JSON returned in the response:
Gets a single category.
GET /stores/{store_hash}/v2/categories/{id}
Example JSON returned in the response:
Gets a count of the total number of categories in the store.
GET /stores/{store_hash}/v2/categories/count
Example JSON returned in the response:
Creates a new category.
POST /stores/{store_hash}/v2/categories
The following properties of the category are read-only. If one or more of these properties are included in the request, it will be rejected.
The following properties of the category are required. The request won’t be fulfilled unless these properties are valid.
Note
To maximize system performance, BigCommerce caps the number of categories that can be added to a store at 16,000. If your POST causes the store to exceed the maximum of 16,000 categories, BigCommerce will return a 403 error.
In addition, BigCommerce caps the total number of parent categories at seven. If your POST includes the ID of a parent category in the parent_id field, BigCommerce will check that parent category and its parent and so on to determine the total number of parent categories. If your POST would cause the total number of parent categories to exceed seven, BigCommerce will return a 403 error.
Example request object:
Example JSON returned in the response:
Updates an existing category.
PUT /stores/{store_hash}/v2/categories/{id}
The following properties of the category are read-only. If one or more of these properties are included in the request, it will be rejected.
The following properties of the category are required. The request won’t be fulfilled unless these properties are valid.
Note
To maximize system performance, BigCommerce caps the total number of parent categories at seven. If your PUT includes the ID of a parent category in the parent_id field, BigCommerce will check the parent and any children of the current category to determine the total number of parent categories. If your PUT would cause the total number of parent categories to exceed the maximum of seven, BigCommerce will return a 403 error.
Example JSON returned in the response:
Deletes a category.
DELETE /stores/{store_hash}/v2/categories/{id}
The Delete All Categories operation will not succeed unless the store has zero products. If any products in the store belong to any categories, the entire operation will fail. Therefore, if you really want to delete all the categories of the store, you must first delete all of the products in the store.
Deletes all the categories in the store.
DELETE /stores/{store_hash}/v2/categories