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

# Pagination and filters

> How list endpoints take filters and return pages of results.

List endpoints use `POST` with the filters in the JSON body.

<Note>
  Lists only contain what the user behind the ID token can access: usually all the accounting firm's customers, or only some of them if the firm restricted the user.

  **See also:** [Data access](/api/data-access)
</Note>

## Paginated lists

These endpoints are paginated:

* [`POST /customers`](/api/endpoints/search-customers)
* [`POST /mandates`](/api/endpoints/search-mandates)
* [`POST /banks`](/api/endpoints/list-banks)
* [`POST /payroll-providers`](/api/endpoints/list-payroll-providers)

They accept two body fields:

| Field    | Default | Description                                                          |
| -------- | ------- | -------------------------------------------------------------------- |
| `limit`  | `50`    | Number of records to return. Values above `200` are capped at `200`. |
| `offset` | `0`     | Number of records to skip.                                           |

They return:

| Field             | Description                                            |
| ----------------- | ------------------------------------------------------ |
| `records`         | The current page.                                      |
| `recordsTotal`    | Number of records visible to the user, before filters. |
| `recordsFiltered` | Number of records matching the filters.                |

To read all results, increase `offset` by `limit` until `offset` reaches `recordsFiltered`.

## Unknown fields

`POST /customers`, `POST /mandates` and `POST /payroll-providers` reject any body field they do not know, with `400 unknownField` and the list of offending `fields`.

Check the spelling of your filters when you get this error.

## Non-paginated lists

These endpoints return every matching item at once, as a plain array:

* [`GET /customers`](/api/endpoints/list-all-customers)
* [`POST /coda-files`](/api/endpoints/list-coda-files)
* [`POST /codb-files`](/api/endpoints/list-codb-files)

For files, keep responses small by acknowledging files once downloaded: acknowledged files are no longer listed.
