Pagination
Iterate over list responses using limit and offset
All list endpoints in the RevKeen API use offset-based pagination via limit and offset query parameters. Responses are wrapped in a data array alongside a pagination block describing the current window.
If you are migrating from a cursor-based API, think of offset as the zero-based index of the first item you want back and limit as the page size.
Request parameters
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
limit | integer | 25 | 100 | Number of items to return. Values above the max are clamped. |
offset | integer | 0 | — | Zero-based index of the first item to return. |
List endpoints may also expose resource-specific filters (for example status, search, or created_after). See each endpoint's reference for the full parameter list.
Response shape
{
"data": [
{ "id": "cus_01HT...", "name": "Acme Clinic", "email": "ops@acme.example" },
{ "id": "cus_01HT...", "name": "Riverside Dental", "email": "admin@rsd.example" }
],
"pagination": {
"limit": 25,
"offset": 0,
"total": 312,
"hasMore": true
}
}| Field | Type | Description |
|---|---|---|
data | array | Current page of items. |
pagination.limit | integer | Echo of the requested limit after clamping. |
pagination.offset | integer | Echo of the requested offset. |
pagination.total | integer | Total items matching the filter, across all pages. |
pagination.hasMore | boolean | true when offset + data.length < total. |
Iteration pattern
Continue fetching until pagination.hasMore is false. Advance offset by the page size, not by data.length — the latter drifts on the last page.
The Go and PHP tabs show generated source shapes only. Their supported package channels are not live; use cURL or the available TypeScript SDK today.
# Page 1
curl "https://staging-api.revkeen.com/v2/customers?limit=100&offset=0" \
-H "x-api-key: $REVKEEN_API_KEY"
# Page 2
curl "https://staging-api.revkeen.com/v2/customers?limit=100&offset=100" \
-H "x-api-key: $REVKEEN_API_KEY"Choosing a page size
- Default (
limit=25) is tuned for interactive UIs. limit=100is the right choice for batch workloads and exports.- For end-user-facing lists, page from the server rather than fetching all pages and slicing client-side — latency and memory both scale linearly.
Stability across pages
Items are ordered by createdAt DESC, id DESC unless a list endpoint documents otherwise. If new items are created while you are iterating, an item may appear on a later page than expected. For strict one-shot snapshots, filter by a fixed created_before timestamp.