> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.fidly.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination and filters

> How lists and filters behave across the whole API.

## Pagination

Every list endpoint is paginated with the same two query parameters:

| Parameter | Bounds  | Default |
| --------- | ------- | ------- |
| `limit`   | 1–100   | 50      |
| `offset`  | 0–10000 | 0       |

The response wraps the page:

```json theme={null}
{ "items": [ ... ], "total": 123, "limit": 50, "offset": 0 }
```

Documents are sorted newest first.

## Filters

* Filters are query parameters (`?origin=peppol`, `?type=company`, ...). Each list
  endpoint documents its own set in the API reference.
* Enumeration filters accept a **comma-separated list** treated as a logical OR:
  `?origin=manual,peppol,mail`.
* An unknown filter value returns `400 invalid_filter` with the allowed values in the
  message.

## Retrieving all your data

`offset` is capped at 10000 — a service protection: paginating very deep by offset
is expensive. The cap does not prevent a full retrieval:

* **Documents** — the only high-volume resource: slice by date windows with
  `issue_date_from` / `issue_date_to` (one year at a time, for example) and
  paginate within each window. `total` tells you when a window needs narrowing.
* **Other resources** stay far below the cap (a few bank accounts, journals or
  delivery locations per company).
