Rate limits
How many requests a key and a company may send per minute, and what to do at the limit.
Version v1.1, updated
Requests are counted per minute, for each key and for all the keys of a company together. The headers of every answer tell you how many are left.
The limits
BIRP can set other limits for a company. GET /v1/me returns the ones that apply to your key. Each network address also has a limit.
The headers
At the limit
A request over a limit answers 429 rate_limited, with Retry-After in seconds and limit_scope naming the limit reached: key, company or ip.
{
"code": "rate_limited",
"detail": "The rate limit has been reached. Retry after the number of seconds in Retry-After.",
"instance": "/v1/categories",
"limit_scope": "key",
"request_id": "a1b2c3d4-0000-4000-8000-0000000000ee",
"status": 429,
"title": "Too many requests",
"type": "https://birp.io/developers/errors/rate_limited"
}Stay under it
Wait the
Retry-Afterseconds before you retry; never retry at once.Read with the largest page size, so a sync needs fewer requests.
Use
updated_sinceto read only what changed since the last sync.Use a batch to write up to 100 products or customers in one request.
Spread scheduled syncs over the minute instead of starting them all at once.
Related
- handling-errors
- pagination-and-filtering
- batches