Replace a sort option
Replace a sort option
PUT/v1/sort_option/{sort_by}/{sort_order}
Use it in a workflow
- Add a step and choose the Constructor connector.
- Pick the Replace a sort option action (under Sort Options).
- Fill in the fields below, then reference the result from later steps as
{{replaceASortOption.response.data}}.
Request
Path parameters
Query parameters
sectionstring
The section of the index to use. Defaults to `Products`.
cstring
The ID of the client and version that the request is coming from, such as `cio-js-2.90`.
Request body
Enter the body as JSON in the step's Body field.
display_namestring
The name of the sort option as it is displayed to end users.
path_in_metadatastring
The path in the item's metadata to the field that results will be sorted according to.
positioninteger
The position of the sort option, used to provide sort options in a specific order.
hiddenboolean
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.
Default false
{
"display_name": "string",
"path_in_metadata": "string",
"position": 0,
"hidden": false
}
Response
Returns 200 with an object. Read it in later steps with {{replaceASortOption.response.data.<field>}}.
display_namestring
The name of the sort option as it is displayed to end users.
path_in_metadatastring
The path in the item's metadata to the field that results will be sorted according to.
positioninteger
The position of the sort option, used to provide sort options in a specific order.
hiddenboolean
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.
Default false
sort_bystring
The name of the sort option.
sort_orderany
The order the results will be sorted in
{
"display_name": "string",
"path_in_metadata": "string",
"sort_by": "string",
"sort_order": null,
"position": 0,
"hidden": false
}
Need more? See the Constructor guide for connection setup and behaviour shared by every action.