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

# Pagination

> List endpoints return a consistent page-based envelope.

All list endpoints (those requiring an `X.list` scope) use page-based pagination with a consistent request and response shape.

## Request parameters

| Parameter | Type | Default | Constraints | Description |
| - | - | - | - | - |
| `page` | number | `1` | 1–10000 | Page number (1-based). |
| `limit` | number | `10` | 1–20 | Items per page. |

```bash theme={null}
curl "https://api.origin.one/api/v2/locations?page=2&limit=20&state=CA" \
  --header "Authorization: Bearer $ORIGIN_ONE_API_TOKEN"
```

## Response envelope

Every paginated response wraps the items in the same envelope:

```json theme={null}
{
  "data": [
    { "object": "location", "id": "456", "name": "Downtown Office" }
  ],
  "total": 42,
  "page": 2,
  "limit": 20
}
```

| Field | Description |
| - | - |
| `data` | The items on this page. |
| `total` | Total number of items across all pages. |
| `page` | The current page number (1-based). |
| `limit` | Items per page, as applied by the server. |

To fetch all records, keep incrementing `page` until `page * limit >= total`.

## Filtering

List endpoints accept resource-specific filters as query parameters alongside `page` and `limit` — for example `name`, `city`, `state`, and `companyId` on [List locations](/api-reference/locations/list). Filters are documented on each endpoint page.


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