Skip to content

Orderby

Use $orderby to sort returned resources by a supported property.

The current OpenAPI specifications document $orderby for DAM list operations and several Catalog list and changelog operations.

Syntax

$orderby=PROPERTY_NAME asc
$orderby=PROPERTY_NAME desc

If the direction is omitted, the API may apply its default sort direction. Specify asc or desc explicitly when result order matters.

Examples

Sort Catalog products:

GET https://api2.saleslayer.com/catalog/Products?$select=prod_ref,prod_title&$orderby=prod_ref asc

Sort DAM images:

GET https://api2.saleslayer.com/dam/images?$orderby=createdOn desc

Supported properties

Sortable properties depend on the endpoint and resource.

For Catalog resources, check the corresponding metadata endpoint and the Catalog endpoint reference.

For DAM images and files, check the DAM endpoint reference. Both support sorting by createdOn and modifiedOn.

Catalog system dates such as *_creation, *_modify, and changelog modified_at are UTC instants. Custom attributes of type Date are returned without a time zone; do not interpret their values as UTC when using or displaying sorted results. DAM createdOn and modifiedOn are UTC ISO 8601 timestamps with a Z suffix.

Catalog changelog endpoints sort by one field only: id, item_id, or modified_at. Only the first clause of a multi-field $orderby is applied. Without $orderby, the newest changelog entries come first. Use modified_at desc to request that order explicitly.

Notes

  • Sorting is documented for root resource properties.
  • Use stable sorting with pagination to avoid duplicated or missing records in long-running reads.
  • Avoid sorting by fields that are not documented as supported by the target endpoint.