Pagination & filters
Walk through lists and keep another system in sync.
Every list endpoint returns a page:
{
"object": "list",
"data": [{ "object": "order", "id": "…" }],
"has_more": true,
"next_cursor": "eyJjIjoiMjAyNi0xMC0wMSAwOToz…"
}Cursors
Pass next_cursor back as cursor to get the next page. Stop when
has_more is false.
curl "https://api.zaher.io/v1/orders?limit=100&cursor=eyJjIjoiMjAy…" \
-H "Authorization: Bearer zk_live_..."limit— 1 to 100, default 25.order—desc(newest first, the default) orasc, bycreated_at.- Treat the cursor as opaque, and keep the other parameters the same while paging.
Cursors point at a position in the list rather than a page number, so new records arriving while you page never shift results — you won't miss or repeat anything.
let cursor: string | null = null;
do {
const query = new URLSearchParams({ limit: "100", ...(cursor && { cursor }) });
const page = await zaher<OrderList>(`/orders?${query}`);
for (const order of page.data) await save(order);
cursor = page.next_cursor;
} while (cursor);Filters
All lists accept:
| Parameter | Matches |
|---|---|
created_after, created_before | Records created after / before an ISO 8601 time |
updated_after, updated_before | Records changed after / before — orders, products and customers |
Plus filters for each resource:
| Endpoint | Filters |
|---|---|
GET /orders | status, fulfillment_status, channel |
GET /bookings | status |
GET /products | status, type, sku (exact) |
GET /customers | email (exact) |
Deleted products are left out unless you ask for status=deleted.
Keeping a system in sync
To mirror orders into another system, poll with updated_after set to the
time of your last successful sync, and page through the result:
curl "https://api.zaher.io/v1/orders?updated_after=2026-10-06T09:00:00Z&order=asc&limit=100" \
-H "Authorization: Bearer zk_live_..."Save the sync time before you start the run, so changes made during it are picked up next time. Pair this with webhooks for real-time updates — the poll is your safety net.