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

# Pagination

> How list endpoints paginate results

List endpoints in the Debbie API are paginated with the `page` and `pageSize` query parameters.

## Parameters

* `page` — the page to get, starting from `0`. Defaults to `0`.
* `pageSize` — the number of items per page. Each endpoint documents its default and maximum page size.

## Response format

Paginated endpoints return the items of the requested page together with a `meta` object:

```json theme={null}
{
  "meta": {
    "currentPage": 0,
    "pageSize": 250
  },
  "items": [
    { "...": "..." }
  ]
}
```

## Iterating through all pages

The response does not include a total count. To fetch all items, keep requesting the next page until a page contains fewer items than `pageSize`:

```
GET /v1/{tenantId}/updates/types?page=0&pageSize=250
GET /v1/{tenantId}/updates/types?page=1&pageSize=250
...
```

When `items.length < pageSize`, you have reached the last page.

## Best practices

* Use a fixed `pageSize` for all requests in an iteration — changing it between pages will skip or repeat items
* Requesting a page beyond the last one returns an empty `items` array
