<!--
{
  "availability" : [
    "Apple Ads Platform API: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Apple-Ads-Platform-API",
  "identifier" : "/documentation/Apple-Ads-Platform-API/Sorting",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple Ads Platform API"
    ],
    "preciseIdentifier" : "data:apple-ads-platform-api:Sorting"
  },
  "title" : "Sorting"
}
-->

# Sorting

Sort condition for reporting requests.

```
object Sorting
```

## Discussion

The `Sorting` specifies a single sort condition for a reporting request.

Multiple `Sorting` objects can be included in the `sorting` array of a reporting request to apply multi-level sorting: results are sorted by the first entry first, then by subsequent entries for ties. When you omit `sorting`, the API sorts results by entity `id` in ascending order by default.

### Example

```json
{
  "field": "localSpend",
  "order": "DESC"
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)