Note: You can get the full list of sortable attributes from the documentation of each resource.
When you fetch a collection of resources, you can request a specific sort for the results. For example, the following request fetches a collection of SKUs sorted by their creation date (descending) and code.
GET /api/skus/1234?sort=-created_at,code HTTP/1.1 Accept: application/vnd.api+json
The value of the
sort parameter must be a comma-separated list of fields.
The sort order for each field is ascending unless prefixed with a
- (minus) in which case it's descending.
By default, the API sorts ascending on the
id of the primary resource.