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

# Pagination

> List and filter invoices and notes with cursor pagination.

`GET /v1/invoices` and `GET /v1/notes` list the documents of the API key's tenant and stage,
newest first, so you can reconcile ("which invoices did I issue yesterday, and which did the
DIAN accept?") or catch up after a lost webhook. Each item is exactly what the single read
(`GET /v1/invoices/{document_id}`, `GET /v1/notes/{kind}/{document_id}`) returns, including
the buyer as signed (`customer`: `id_type`, `id_number` without check digit, `name`).

Filters, all optional and combined with AND:

| Parameter | Filters by |
| - | - |
| `kind` (notes only) | `credit_note` or `debit_note`; both when absent |
| `reference` | The `reference` given on create (exact) |
| `prefix`, `number` | The two parts of `document_id` (exact) |
| `customer_id_number` | The buyer's identification number as signed, without check digit (exact) |
| `dian_outcome` | `accepted`, `rejected`, or `pending` (no final DIAN answer yet) |
| `issued_from`, `issued_to` | Issue date, `YYYY-MM-DD` in Colombian time, both inclusive |

Pages hold `limit` items (1 to 50, 20 by default). The answer is
`{"items": [...], "next_cursor": "..."}`: send `next_cursor` back as `cursor`, **with the same
filters**, for the next page; it is `null` on the last page. A cursor sent with other filters
answers `422 invalid_cursor`. Documents created while you walk the list never shift or repeat
the pages you have not read yet; start a new walk to see them. There is no total count, and no
match is `200` with an empty `items`, never a `404`.

```sh theme={null}
curl -s "$CUFEA/v1/invoices?issued_from=2026-12-01&issued_to=2026-12-01&dian_outcome=accepted&limit=50" \
  -H "Authorization: Bearer $CUFEA_KEY"
```

With the TypeScript SDK, `cufea.invoices.listAll({ issued_from: "2026-12-01" })` follows the
cursor for you (`for await (const invoice of ...)`).


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