Rate limits
Available
Which routes are limited, by how much, and what to do with a 429 or a 503.
Each limit is a bucket: a client may send a burst, then requests come back at a steady rate. These routes are limited:
POST /v1/auth/loginand the other sign-in steps (invitation links, the two-step code, forgot password), one bucket: bursts of 20, then 10 a minute per client address.POST /v1/oauth/tokenandPOST /v1/oauth/revoke, one bucket: bursts of 30, then 30 a minute per client address.- Every
/v1/public/…route and/{slug}/did.json: bursts of 60, then 20 a second per client address. GET /v1/public/resolve, on top: bursts of 60, then 30 a minute.- A lot's EPCIS download and a fruit's recording, on top, by size: bursts of 32 MiB, then 64 KiB a second.
POST /v1/public/reports, on top: 5 an hour per client, and 20 an hour per fruit whoever sends them.- The batch routes, per company and credential: bursts of 10, then one every 6 seconds.
- Full company exports: at most 3 requests in any 24 hours (429
too_many_exports). POST /v1/auth/password/recover, on top of that: 5 an hour per email named, whoever sends it.- Support requests and personal data requests (for signed-in people only): at most 5 support requests an hour and 10 in any 24 hours per person, and 30 in any 24 hours per company; at most 5 personal data requests per person and 50 per company in any 24 hours.
Other routes have no rate limit today; still send requests at a steady pace and handle 429 everywhere.
429 and Retry-After
A refused request answers 429 with Retry-After in whole seconds: too_many_requests for the limits above, too_many_exports for the full company export, and codes of their own starting with too_many_… for support requests and personal data requests. When an API client already holds 20 live tokens, POST /v1/oauth/token answers 429 invalid_request (an OAuthError) until one expires. A refused request did nothing: no change and no activity log row. Wait at least that long before you send it again.
503 and maintenance
Every 503 carries Retry-After. During database maintenance the API is read-only: reads work, and every write (and every audited export) answers 503 read_only with Retry-After: 60. A short overload answers 503 busy_retry with Retry-After: 2. Retry later, and send writes with an Idempotency-Key so that a retry never applies twice.