---
title: Sorting
framework: Apple Ads Platform API
role: symbol
role_heading: Object
platforms: [apple ads platform api 1.0+]
path: apple-ads-platform-api/recommendationsorting
---

# Sorting

A sort specification used in a recommendation query request to order results.

## Declaration

```data
object RecommendationSorting
```

## Properties

field: The name of the field to sort by. Use creationTime to sort by when the recommendation was created, or expirationTime to sort by recommendation expiry and act on time-sensitive items first. order: The sort direction. Defaults to ASC when omitted. See SortingOrder.

## Discussion

Discussion The Sorting specifies one sort dimension in the sorting array of a QueryRequest. The sorting array supports multiple entries, which the system applies in order. The first entry is the primary sort, the second is the tiebreaker, and so on. Example {   "field": "creationTime",   "order": "DESC" }

## See Also

- [RecommendationQueryRequest](apple-ads-platform-api/recommendationqueryrequest.md)
- [QueryRequestPagination](apple-ads-platform-api/recommendationqueryrequestpagination.md)
- [SortingOrder](apple-ads-platform-api/recommendationsortingorder.md)
- [FilterCondition](apple-ads-platform-api/recommendationfiltercondition.md)
- [FilterOperator](apple-ads-platform-api/recommendationfilteroperator.md)
- [RecommendationState](apple-ads-platform-api/recommendationstate.md)
- [RecommendationStatus](apple-ads-platform-api/recommendationstatus.md)
- [RecommendationCategory](apple-ads-platform-api/recommendationcategory.md)
