Lists, pagination and updated_since
The paged lists are sync lists: read them page by page with a cursor, then only what changed since your last run.
Paging through a list
- Lists are ordered by
(updated_at, id)and read page by page: passmeta.next_cursorascursor; it isnullon the last page and opaque. per_page1 to 100 (default 50; more is capped at 100).
Worked example
The first page:
curl -sS "https://s.zo.sa/api/public/v1/products?per_page=100" \
-H "Authorization: Bearer $ZO_API_KEY" \
-H "Accept: application/json"The answer holds the rows in data and the paging in meta:
{
"data": [ ... ],
"meta": { "per_page": 100, "next_cursor": "..." }
}The next page passes that next_cursor as cursor, with the same other parameters, until next_cursor is null:
curl -sS "https://s.zo.sa/api/public/v1/products?per_page=100&cursor=$NEXT_CURSOR" \
-H "Authorization: Bearer $ZO_API_KEY" \
-H "Accept: application/json"Only what changed
updated_sinceandcreated_since: ISO 8601, inclusive, whole seconds, no offset means UTC.- Same-second limit and re-sync recipe:
updated_athas second precision, so a row changed in the very second a page ends on can be missed by that run. Keep the largestupdated_atyou saw and start the next run withupdated_sinceequal to it: the filter is inclusive, so that second is read again. A row changed while you page moves to the end and may arrive twice, so store by id (upsert).
curl -sS "https://s.zo.sa/api/public/v1/orders?updated_since=2026-11-23T06:01:53Z&per_page=100" \
-H "Authorization: Bearer $ZO_API_KEY" \
-H "Accept: application/json"Lists without updated_since
Lists whose rows never change are ordered by created_at only and refuse updated_since (422): stock movements (GET /inventory/movements), abandoned carts (GET /carts/abandoned; a cart becomes abandoned by time passing, so read the list afresh each time) and webhook deliveries (GET /webhooks/{id}/deliveries).
Lists that are not paged
These reads answer every row in one data array, with no meta and no cursor:
GET /orders/{id}/history: The order's status changes, oldest firstGET /order-statuses: Every order status and where an order may go from itGET /inventory: One variant's stock in each branch (pass sku or variant_id)GET /branches: The store's branches and warehouses (not paged)GET /orders/{id}/shipments: The order's shipments (not paged)GET /orders/{id}/payments: The order's payments (not paged)GET /payment-methods: Which payment methods the store takes nowGET /webhooks/events: The events a webhook may subscribe to (no plan feature needed beyond public_api)
Encoding the query
- A time with an offset: a
+in a query string reads as a space, so encode it as%2B:updated_since=2026-11-23T09:01:53%2B03:00. A time without an offset is read as UTC. - Filters with brackets: curl treats
[and]as a pattern, so add-g(curl -g ".../products?filter[status]=active") or encode them as%5Band%5D. - SKUs: URL-encode a SKU in a path or a query, such as a space as
%20.
Deletions
A deleted row (a product, customer, coupon…) vanishes from the lists and never comes back through updated_since. To learn what was deleted, re-read the whole list now and then and compare, or subscribe to the *.deleted webhooks (Pro plan).
Every list and its query parameters
From the OpenAPI file: the lists read with a cursor and every query parameter each one takes.
| List | Query parameters |
|---|---|
GET /products | per_page cursor updated_since created_since filter[status] filter[type] filter[category_id] filter[sku] |
GET /categories | per_page cursor updated_since created_since |
GET /brands | per_page cursor updated_since created_since |
GET /orders | per_page cursor updated_since created_since filter[status] filter[payment_status] filter[customer_id] |
GET /customers | per_page cursor updated_since created_since filter[mobile] filter[email] |
GET /inventory/movements | per_page cursor created_since filter[variant_id] filter[sku] filter[branch_id] |
GET /coupons | per_page cursor updated_since created_since filter[is_active] filter[code] |
GET /shipments | per_page cursor updated_since created_since filter[order_id] filter[status] filter[carrier] |
GET /reviews | per_page cursor updated_since created_since filter[product_id] filter[status] filter[stars] |
GET /carts/abandoned | per_page cursor created_since |
GET /webhooks | per_page cursor updated_since created_since |
GET /webhooks/{id}/deliveries | per_page cursor created_since filter[status] |