---
title: Sorting
slug: neurons-api/sorting
createdAt: 2026-08-19T08:34:10.105Z
---

:::hint{type="info"}
Complex fields, such as sub collections and nested json objects with child properties, are not sortable. See the descriptions of the [cve](docId\:VWzHdvV7uiw8NtwjuUZ3p), [notification](docId\:Mjf7s-U4YmNDNQX6GRhmi) and [patch](docId\:ZrTaYnkOHm7gEw9DY-0h5) endpoints to learn which fields are not sortable.
:::

A simplistic sorting syntax is supported. Sort expressions should be presented in the following format:

```bash
{SortField:required} {direction|asc|desc:optional} delimited by a comma (,)
```

The supported sort directions are explicit and only **asc** and **desc**. Similar to filtering, sort field names are case insensitive. When a sort direction is left out, the field is assumed to be sorted in ascending order. By default, all fields are sortable and the query string parameter name is **orderby**.

| Sort Expression                      | Expected Output                                                                                                                 |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| ?orderby=Field1 asc, Field2 desc     | The data resource will be initially sorted in asc order by Field1, then Field2 in desc order                                    |
| ?orderby=Field1, Field2              | The data resource will default to first sorting by Field in asc order, then Field2 in asc order                                 |
| ?orderby=Field1, Field2, Field3 desc | The data resource will be initially sorted in asc order by Field1, then Field2 in asc order and finally by Field3 is desc order |
