Sort resources that are returned from the API by using these parameters:
Field | Description |
---|---|
order_field | The field by which the resources are to be sorted. The value of this parameter is an enum. See each endpoint to know the possibles values |
order_mode | The kind of sort, it can be ascendant or descendant. The value of this parameter is an enum of the following values: ASC, DESC |
You can, therefore, easily sort resources using &order_field=VALUE and &order_mode=VALUE query string parameters. Both of these values are enum.
NOTE: See each endpoints reference to see possible variations of these parameters.
Example: Get all products sorted by productID descendant
curl --request GET \
--url 'https://api.scalefast.com/products?clientID=CLIENT_ID&access_token=ACCESS_TOKEN&order_field=productID&order_mode=DESC' \
--header 'accept: application/json'