# Pagination

Endpoints that return a collection wrap it in a consistent **list envelope** and page with `limit` and `skip`.

```json
{
  "object": "list",
  "url": "/v1/transaction_intents",
  "data": [
    { "id": "tin_...", "object": "transactionIntent" }
  ],
  "start": 0,
  "end": 1,
  "total": 42
}
```

| Field | Type | Description |
| --- | --- | --- |
| `object` | string | Always `"list"` for a collection response. |
| `url` | string | The path the collection was fetched from. |
| `data` | array | The page of records. |
| `start` | integer | Index of the first returned record (the `skip` you sent). |
| `end` | integer | Index after the last returned record. |
| `total` | integer | Total number of records matching the query, across all pages. |

## Query parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `limit` | integer | Maximum number of records to return (minimum `1`). |
| `skip` | integer | Number of records to skip from the start (minimum `0`). Offset-based paging. |
| `order` | string | Sort order, `asc` or `desc`. |

Page forward by advancing `skip` in steps of `limit` until `start + data.length` reaches `total`:

```bash
# First page
curl "https://api.openfort.io/v1/transaction_intents?limit=10&skip=0" \
  -H "Authorization: Bearer sk_test_..."

# Next page
curl "https://api.openfort.io/v1/transaction_intents?limit=10&skip=10" \
  -H "Authorization: Bearer sk_test_..."
```

## Expanding related data

Many endpoints accept an `expand` parameter to inline related objects that are otherwise returned as ids, saving a follow-up request. Pass one field per value:

```bash
curl "https://api.openfort.io/v1/transaction_intents?expand=policy&expand=player" \
  -H "Authorization: Bearer sk_test_..."
```

The fields each endpoint can expand are listed on its page in this reference.
