Appearance
Sorting
Use the sort query parameter to control the order of results returned by the list endpoint.
Basic sorting
Sort by a single field in ascending order:
GET /v2/resources/posts?sort=titlePrefix with - for descending order:
GET /v2/resources/posts?sort=-created_atMulti-field sorting
Sort by multiple fields using a comma-separated list. Priority follows the order of fields:
GET /v2/resources/posts?sort=-published_at,titleThis sorts by published_at descending first, then by title ascending for resources with the same publication date.
Sortable fields
System fields
| Field | Description |
|---|---|
created_at | Resource creation date |
updated_at | Last modification date |
published_at | Publication date |
Blueprint fields
Any field defined in the blueprint can be used for sorting. Use the field's slug as the sort key (on a blueprint with variants, the values of the requested variant are used):
GET /v2/resources/products?sort=-price
GET /v2/resources/posts?sort=titleUnknown fields
Sort keys that are neither a system field nor a field of the blueprint are silently ignored: no error is returned. sort=-nope,title sorts by title only. If every key is unknown, the default sort does not apply either and the order is unspecified.
Default sort
If no sort parameter is provided, results are sorted by created_at descending (newest first).
The export endpoint ignores sort.