Sort order
Get Product Sort Order
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/categories/{category_id}/products/sort-orderRequest
Returns a list of products and their sort order for a specific category.
Usage Notes
- Data pairs are displayed in ascending order based on products'
sort_order
values. null
values are allowed for products without specifiedsort_order
values.- Products with
sort_order
value ofnull
will be displayed after products with valid numerical values. - The priorities for determining product sort order on a storefront are the following:
- Priority 1: Manually specified sort order on Category Level (API).
- Priority 2: Manually specified sort order on Product (Global) Level (UI/API).
- Priority 3: Default sorting by Product ID (newly added products go first) (UI/API).
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
array | application/json
product_idinteger
requiredThe ID of the associated product.
Min: 1Example: 99sort_orderinteger
requiredExample: 4
example
Update Product Sort Order
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/categories/{category_id}/products/sort-orderRequest
Updates sort order of products within a specific category.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
array | application/json
product_idinteger
requiredThe ID of the associated product.
Min: 1Example: 99sort_orderinteger
requiredExample: 4
example
Response
Body
array | application/json
product_idinteger
requiredThe ID of the associated product.
Min: 1Example: 99sort_orderinteger
requiredExample: 4
example
Did you find what you were looking for?