Guides
Limits & best practices
What the API limits, and how to build an integration that stays within it.
#Limits
| Limit | Value |
|---|---|
| Request size | 27 MB |
| Pictures | 5 files per request, 5 MB each; JPEG, PNG, WebP or GIF; at most 20 per box or location |
| List page size | 1 to 200 (default 50) |
| Access token lifetime | 15 minutes |
| Failed authentications | 10 per 5 minutes per IP address, then 429 |
Idempotency-Key | 1 to 200 characters; remembered for 24 hours |
| Text fields | Location name 100, description and address 250; box name and description 255; external_id 100 characters |
| Time per request | A few seconds. A request that runs too long answers 503. |
Request rate
There is no hard request-rate limit in this preview, and limits may be introduced later. Please be considerate: a few requests per second is plenty, and batching with
PUT …/by-external-id/… is better than reading everything before every write.#Synchronising your catalogue
- Keep your own id as
external_idon every location and box. - When something changes in your system, call
PUT /v1/locations/by-external-id/{id}orPUT /v1/boxes/by-external-id/{id}with the fields that changed. - For stock, send the full current figure (
available_units), never an increment: customers may book while your feed runs. - Submit new boxes for review when their
missinglist is empty. - Read the reference lists once a day at most.
#Retrying
Retry on timeouts, 5xx and 429, with growing pauses and the same Idempotency-Key:
JavaScript
async function send(url, options, tries = 5) {
const key = crypto.randomUUID(); // one key per operation
for (let attempt = 0; attempt < tries; attempt++) {
try {
const res = await fetch(url, {
...options,
headers: { ...options.headers, "Idempotency-Key": key },
});
if (res.status < 500 && res.status !== 429) return res; // done (or a real error to fix)
const wait = Number(res.headers.get("Retry-After")) * 1000 || 2 ** attempt * 1000;
await new Promise((r) => setTimeout(r, wait));
} catch {
await new Promise((r) => setTimeout(r, 2 ** attempt * 1000)); // network error
}
}
throw new Error("Giving up after " + tries + " tries");
}#Good practice
- Test first. Run new payloads with
?validate_only=true. - Be tolerant when reading. New fields may appear in responses; ignore the ones you do not know.
- Handle
412. It means someone changed the object: read it again and decide. - Log the
request_idof every failed call; it is the fastest way for us to help. - Times are ISO 8601 in UTC.