> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spaportal.cz/llms.txt
> Use this file to discover all available pages before exploring further.

# Sorting

> Order list results with the sort parameter.

List endpoints accept a `sort` query parameter as `<field>:<direction>`, where
direction is `asc` or `desc`.

```bash theme={null}
GET /api/v2/room-types?sort=createdAt:desc
```

* Each endpoint documents its sortable fields and default order.
* Ordering is total and stable: the record `id` is always the final ordering
  key, so no two records tie. Because `id` increases with creation time,
  `createdAt:desc` returns the newest records first. This stable order is what
  lets cursor pagination page through results without skipping or repeating a
  record.
