Sorting
Sort results that are returned from the API by using the sort
parameter with the field name you wish to sort against.
To reverse the sort order, prepend the field with a minus.
Currently, sorting is supported for the following endpoints, and against the following fields:
You can not sort by created_at or updated_at if you are using filtering.
The example below shows how to make a request to get all products, and sort them by the created_at
timestamp.
Sort products by created_at
ASC
created_at
ASCSort products by created_at
DESC
created_at
DESCLast updated