# Orderby

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


```text
$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:


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

Sort DAM images:


```http
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](/apis/catalog-v2.0).

For DAM images, check the [DAM endpoint reference](/apis/dam-v2.0).

## 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.