Thanks for being patient while we implement your feedback to improve the developer experience.

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.

  • category_id in path - integer - required

    The ID of the Category to which the resource belongs.

example

curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/categories/[category_id]/products/sort-order' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

Body

object | application/json

    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.

    • category_id in path - integer - required

      The ID of the Category to which the resource belongs.

    Body

    array | application/json
    • product_id
      integer

      The ID of the associated product.

      Example: 99

    • sort_order
      integer

      Example: 4

    example

    { "product_id": 99, "sort_order": 4 }

    Response

    Body

    array | application/json
    • product_id
      integer

      The ID of the associated product.

      Example: 99

    • sort_order
      integer

      Example: 4

    example

    { "product_id": 99, "sort_order": 4 }