Sifr Wahid Developers

Concepts

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: pass meta.next_cursor as cursor; it is null on the last page and opaque.
  • per_page 1 to 100 (default 50; more is capped at 100).

Worked example

The first page:

Shell
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:

JSON
{
  "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:

Shell
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_since and created_since: ISO 8601, inclusive, whole seconds, no offset means UTC.
  • Same-second limit and re-sync recipe: updated_at has second precision, so a row changed in the very second a page ends on can be missed by that run. Keep the largest updated_at you saw and start the next run with updated_since equal 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).
Shell
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:

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 %5B and %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.

ListQuery parameters
GET /productsper_page cursor updated_since created_since filter[status] filter[type] filter[category_id] filter[sku]
GET /categoriesper_page cursor updated_since created_since
GET /brandsper_page cursor updated_since created_since
GET /ordersper_page cursor updated_since created_since filter[status] filter[payment_status] filter[customer_id]
GET /customersper_page cursor updated_since created_since filter[mobile] filter[email]
GET /inventory/movementsper_page cursor created_since filter[variant_id] filter[sku] filter[branch_id]
GET /couponsper_page cursor updated_since created_since filter[is_active] filter[code]
GET /shipmentsper_page cursor updated_since created_since filter[order_id] filter[status] filter[carrier]
GET /reviewsper_page cursor updated_since created_since filter[product_id] filter[status] filter[stars]
GET /carts/abandonedper_page cursor created_since
GET /webhooksper_page cursor updated_since created_since
GET /webhooks/{id}/deliveriesper_page cursor created_since filter[status]