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

# Pagination, sorting, and filtering

> Conventions for list endpoints: cursor pagination, sorting, and filters.

All list endpoints follow the same conventions for pagination, sorting, and filtering. The sort fields and filters each endpoint supports are listed in its [API reference](/api/v1/parcels/list-parcels).

## Pagination

List endpoints use cursor-based pagination. Each response contains a page of up to 100 results in `data` and a link to the next page in `links.next`:

```json theme={null}
{
  "data": [
    {
      "id": "3f2c8a9b-7e6d-4c5b-9a8f-0e1d2c3b4a59"
    },
    {
      "id": "8b1e4d7a-2c9f-4a3b-b6e5-7d8c9f0a1b2c"
    }
  ],
  "links": {
    "next": "https://api.simplesell.de/v1/parcels?cursor=eyJpZCI6IjhiMWU0ZDdhIn0"
  }
}
```

To get the next page, request the URL in `links.next` as it is. It keeps your sorting and filters. When `links.next` is `null`, you have reached the last page.

## Sorting

Use the `sort` query parameter to sort results by a field. Results are sorted in ascending order. Prefix the field with `-` to sort in descending order:

```text theme={null}
sort=created_at     oldest first
sort=-created_at    newest first
```

If you omit `sort`, the endpoint's default sort order applies. An unsupported sort field returns `400 Bad Request`.

Results with the same value in the sort field always appear in the same order, so pagination doesn't skip or repeat results.

## Filtering

Filters use query parameters in the form `filter[name]=value`:

```text theme={null}
filter[source]=api
```

* If you combine filters, results must match all of them.
* An unsupported filter or an invalid value returns `400 Bad Request`.
* Filters ending in `_since`, such as `filter[created_since]`, match results at or after the given timestamp. Timestamps must use the format `YYYY-MM-DDTHH:MM:SSZ` in UTC.

For example, to get all parcels created through the API since October 1, 2026:

```bash theme={null}
curl -g "https://api.simplesell.de/v1/parcels?filter[source]=api&filter[created_since]=2026-10-01T00:00:00Z" \
  -H "Authorization: Bearer $SIMPLESELL_API_TOKEN"
```

<Note>
  With `curl`, add `-g` (`--globoff`) to URLs with filters. Otherwise, `curl` interprets the brackets as a URL pattern and doesn't send the request. Other HTTP clients send brackets as they are or encode them automatically. The API accepts both.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.