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 date and date-time fields are sorted as UTC instants. DAM createdOn and modifiedOn are returned as UTC ISO 8601 timestamps with a Z suffix.

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.