تخطَّ إلى المحتوى الرئيسي

Paging, errors and limits

Pagination, the error shape, rate limits and idempotency.

Pagination

Lists return data and paging.next. limit is 1–100 (default 50). Pass next as after for the next page until it is null. updated_since returns what changed since a moment, which is the right way to sync periodically.

curl "https://dashboard.xodata.ninja/api/public/v1/orders?limit=100&updated_since=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer <token>"

{ "data": [ … ], "paging": { "next": "48213" } }

curl "https://dashboard.xodata.ninja/api/public/v1/orders?limit=100&after=48213&updated_since=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer <token>"

Errors

{ "error": { "code": "SCOPE_REQUIRED", "message": "…" } }
HTTPcodeMeaning
401INVALID_TOKENThe key or token is unknown, expired or revoked
403SCOPE_REQUIREDThe credential lacks the scope this call needs
403PLAN_INACTIVEThe business's subscription is stopped or expired
404NOT_FOUNDNo such path, or no such record in your scope
409CONFLICTIdempotency key reused with another body, or a slot no longer free
422VALIDATIONThe request is invalid; the message says why
429RATE_LIMITEDOver the limit; wait for Retry-After
502UPSTREAMThe business's data could not be reached now; retry

Rate limits

120 requests per minute per API key or app install, 30 during a trial. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit you get 429 with Retry-After.

Idempotency

Every POST accepts an Idempotency-Key header (up to 128 printable ASCII characters); it is required to create sales orders and bookings. Repeating the same request with the same key within 24 hours returns the first answer unchanged, with Idempotent-Replayed: true, and creates nothing new. The same key with another body answers 409.

curl -X POST https://dashboard.xodata.ninja/api/public/v1/reservations \
  -H "Authorization: Bearer <token>" \
  -H "Idempotency-Key: 7f1c2b0e-booking-2291" \
  -H "Content-Type: application/json" \
  -d '{"start":"2026-11-20T17:00:00Z","party_size":4,"guest_name":"Sara","phone":"+966500000071"}'

Dates and numbers

Every time is ISO 8601 in UTC. Amounts are numbers in the business's currency; ids are positive integers.