Documentation

Reference

Errors and limits

Every error with its code, safe retries and what to do with a 429.

The format

All errors share the same shape, with their HTTP status. fields comes when a value fails: each field, its code and its message. code values never change; messages follow Accept-Language.

Error
{ "error": { "code": "…", "message": "…", "fields": [{ "path": "…", "code": "…", "message": "…" }] } }
codeHTTPWhen
unauthorized401No token, or an expired or invalid one
forbidden403The token lacks that operation's scope
connection_revoked403The operator withdrew access
not_found404The centre, unit, photo or request isn't part of this connection
idempotency_key_reused409The same Idempotency-Key with a different body
facility_not_ready409Sizes, units, floor plan or photos for a centre you haven't sent yet
too_many_facilities409A new centre over the limit: 2,000 per operator and, in testing, 50
too_many_companies409A new company over the limit: 100 a day and 2,000 in all (in testing, 20)
company_exists409You already declared a company with that tax ID, under another identifier
payload_too_large413Over 5 MB of JSON, 2 MB per floor or 15 MB per photo
unsupported_media_type415A photo that isn't JPEG, PNG or WebP
invalid_request400The request can't be understood: malformed JSON, or a field of the wrong type
software_suspended403The Qbox team has suspended your software: write to us
invalid_facility, invalid_company, invalid_unit_types, invalid_units, invalid_floor_plan, invalid_photo, invalid_photos, invalid_facility_list422With fields: every failing field
invalid_lead_status, invalid_rental_status422A status that isn't one of those that can be sent
rate_limited429Too many requests, with Retry-After
server_error500Our fault. Try again with the same Idempotency-Key

Safe retries

Send Idempotency-Key (a UUID) on everything that changes something. With the same key and the same body, for 24 hours, the response is the same, with the Idempotent-Replayed: true header. With a different body, 409 idempotency_key_reused. That way you can safely repeat what you're not sure arrived.

Limits

10 requests per second per operator permission, with bursts of 50. Floor plans and photos, which cost the most to clean, also have their own limit per software, whatever the operator: a floor plan every 5 seconds (5 at once), and photos, 2 a second (20 at once) and 5,000 a day. Over that, 429 rate_limited with Retry-After (in seconds): wait that long and repeat the request with the same Idempotency-Key.

WhatUp to
A JSON body5 MB
A floor plan2 MB per floor, 10 floors
A photo15 MB; 20 per centre
Centres in the daily list2,000
Centres per operator2,000; in testing, 50
A request to /oauth/token16 KB

Questions? Write to us at team@findqbox.com.