BigCommerce
Catalog API
Sort Order

Catalog - Categories

Get Product Sort Order

GET /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 specified sort_order values.
  • Products with sort_order value of null 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_id
    integer
    required

    The ID of the associated product.

    Example: 99

  • sort_order
    integer
    required

    Example: 4

example

Update Product Sort Order

PUT /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_id
    integer
    required

    The ID of the associated product.

    Example: 99

  • sort_order
    integer
    required

    Example: 4

example

Response

Body

array | application/json
  • product_id
    integer
    required

    The ID of the associated product.

    Example: 99

  • sort_order
    integer
    required

    Example: 4

example

Did you find what you were looking for?