Catalog - Categories
Get Product Sort Order
GET /stores/{store_hash}/v3/catalog/categories/{category_id}/products/sort-order
Request
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 header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- category_id in path - integer - required
The ID of the
Category
to which the resource belongs.
example
Response
Body
array | application/json
product_idnumber
sort_orderinteger
example
Update Product Sort Order
PUT /stores/{store_hash}/v3/catalog/categories/{category_id}/products/sort-order
Request
Updates sort order of products within a specific category.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
array | application/json
product_idinteger
requiredThe ID of the associated product.
Example: 99
sort_orderinteger
requiredExample: 4
example
Response
Body
array | application/json
product_idinteger
requiredThe ID of the associated product.
Example: 99
sort_orderinteger
requiredExample: 4