# OrderBy

### Order by Filter <a href="#order-by-filter" id="order-by-filter"></a>

A list of items can be returned in a specific order. To specify the ordering, provide a property to order by and whether the order is ascending or descending.

#### Example <a href="#example" id="example"></a>

**Order contacts by email address**

* **Ascending**

  ```
  EmailAddress
  ```

  becomes

  ```
  https://api.xero.com/api.xro/2.0/Contacts?order=EmailAddress
  ```

  in the query string.
* **Descending**

  ```
  EmailAddress DESC
  ```

  becomes

  ```
  https://api.xero.com/api.xro/2.0/Contacts?order=EmailAddress%20DESC
  ```

  in the query string.

### Links <a href="#links" id="links"></a>

[Xero API Request filters](https://developer.xero.com/documentation/api/requests-and-responses)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/xero/filters/orderby.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
