Skip to content

Use $orderby to sort returned resources by one or more supported properties.

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/rest/Catalog/Products?$select=prod_ref,prod_title&$orderby=prod_ref asc

Sort DAM images:

GET https://api2.saleslayer.com/dam/image?$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, check the DAM endpoint reference.

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.