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

# AuditSorting

A sort directive in an audit query request, specifying a field to sort by and the direction.

```
object AuditSorting
```

## Discussion

Include one or more `AuditSorting` entries in the `sorting` array of an [`AuditQuery`](/documentation/Apple-Ads-Platform-API/AuditQuery) request to control the order of results. When you omit this array, the API returns results sorted by `eventTime` descending (most recent first).

```json
"sorting": [
  { "field": "eventTime", "order": "DESC" }
]
```

The API applies multiple sort directives in order. The first directive is the primary sort. Subsequent entries break ties.

### Example

```json
{
  "field": "eventTime",
  "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)