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

# Pagination

> Understand how to work with paginated responses from the Zamp API.

# Overview

The Zamp API supports pagination for all list endpoints. When an API response returns a list of objects, regardless of the amount, pagination is supported.

## Key Concepts

* Objects are nested in a `data` attribute
* A `nextCursor` attribute indicates whether additional pages exist
* When `nextCursor` is `null`, no more pages remain
* Results default to **10 items** per response (maximum: 100)
* Objects are ordered by creation timestamp in descending order

## Query Parameters

| Parameter | Type                      | Description                                                     |
| --------- | ------------------------- | --------------------------------------------------------------- |
| `limit`   | integer (1-100, optional) | Controls number of items returned. Defaults to 10.              |
| `cursor`  | string (optional)         | Pagination token from a previous response's `nextCursor` value. |

## Example

**First request:**

```bash theme={null}
curl -G https://api.zamp.com/transactions \
  -H "Authorization: Bearer {token}" \
  -d limit=3
```

**Response:**

```json theme={null}
{
  "nextCursor": "x4WycXedwhQrEFuM",
  "data": [
    {"id": "WAz8eIbvDR60rouK"},
    {"id": "hSIhXBhNe8X1d8Et"},
    {"id": "fbwYwpi9C2ybt6Yb"}
  ]
}
```

**Next page request using the cursor:**

```bash theme={null}
curl -G https://api.zamp.com/transactions \
  -H "Authorization: Bearer {token}" \
  -d limit=3 \
  -d cursor=x4WycXedwhQrEFuM
```

**Final response (no more pages):**

```json theme={null}
{
  "nextCursor": null,
  "data": [
    {"id": "SIuAFUNKdSYHZF2w"},
    {"id": "l7cGNIBKZiNJ6wqF"}
  ]
}
```
