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

# Pagination

> Handle paginated responses from the Nmbr API

In our API, responses that return lists of objects are paginated. Pagination breaks down a large response into smaller responses called pages that the caller can step through to read all of the data. Nmbr paginates responses to ensure that response sizes are kept small and response times remain low.

## Paginated Response

Endpoints that return a list of objects break the list up into multiple pages of up to 15 objects. For example, a list of 100 employees will be broken down into 7 pages, with the first six pages containing 15 employees each and the last page containing the remaining 10 employees.

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "<id>",
      "object": "employee",
      "data": {
        <data>
      },
      "links": {
        "self": "/employees/<id>"
      }
    }
  ],
  "links": {
    "first": "/employees?page=1",
    "last": "/employees?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 15,
    "total": 1,
    "has_more": false
  }
}
```

The `data` property contains the current page of objects.

The `links` and `meta` properties contain information about the pagination of the objects, allowing clients to navigate through the paginated data efficiently and correctly.

The `links` property contains links to four specific pages of data:

* `first`: The URL of the first page of objects.
* `last`: The URL of the last page of objects.
* `prev`: The URL of the previous page of objects, or `null` if the current page is the first page.
* `next`: The URL of the next page of objects, or `null` if the current page is the last page.

The `meta` property contains metadata about the pagination:

* `current_page`: The page number of the current page of objects.
* `last_page`: The page number of the last page of objects, which is the total number of pages in the list.
* `per_page`: The number of objects returned per page (15).
* `total`: The total number of objects in the list.
* `has_more`: `true` if there are more pages available, or `false` if the current page is the last page of objects.
