---
title: "Retrieve sort options"
method: GET
path: "/v1/sort_options"
tags: ["Sort options"]
---

# Retrieve sort options

`GET /v1/sort_options`

**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**
For authenticating with Bearer token, required scopes are: `sort_options(r)`.

Retrieve all sort options, optionally filtered by `sort_by`.

## Query parameters

- `key` string, required — The key of the index to use.
- `section` string — The section of the index to use. Defaults to `Products`.
- `num_results_per_page` integer — The number of results per page to return.
- `page` integer — The page of results to return.
- `offset` integer — The number of results to skip from the beginning. Cannot be used together with `page`.
- `sort_by` string — `sort_by` field of the sort options that you'd like to retrieve
- `c` string — The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

## Response `200`

OK

- SortOptionListGetResponse
  - `total_count` integer, required
  - `sort_options` SortOptionResponse[], required
    - `display_name` string, required — The name of the sort option as it is displayed to end users.
    - `path_in_metadata` string, required — The path in the item's metadata to the field that results will be sorted according to.
    - `position` integer — The position of the sort option, used to provide sort options in a specific order.
    - `hidden` boolean — Indicates if a sort option is hidden. This can be marked at `sort_by` level. A hidden sort option will be ignored in response by default.
    - `sort_by` string, required — The name of the sort option.
    - `sort_order` 'ascending' | 'descending', required

## Other responses

- `400` — Validation Error
- `401` — Credentials are not passed or action is forbidden.
- `403` — The supplied token does not have the required permissions.
- `429` — Rate limit breached

---

[API](https://skmtc.dev/constructor/apis/autocomplete.md) · [All operations](https://skmtc.dev/constructor/apis/autocomplete/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/constructor/autocomplete/revisions/2d33330633b6/schema)
