Skip to main content

Errors

An error answers a status code and a JSON envelope with two fields: code, stable, for your program, and detail, a message for a person in Spanish that can change wording at any time. Branch on code, never on detail.

{ "detail": "El rango no puede pasar de 92 días.", "code": "range_too_long" }

Every code​

StatuscodeMeaning
400range_too_longdate_from to date_to spans more than 92 days.
400location_forbiddenA location that is not a site of the company.
400(none)A parameter is invalid: see below.
401not_authenticatedNo key in Authorization: Bearer.
401api_key_invalidThe key does not exist or was revoked.
401api_key_expiredThe key passed its expiry date.
401company_suspendedThe company is suspended or closed.
403api_not_includedThe company's plan has no API.
404not_foundA page of the detail past the last one.
429throttledToo many requests for the key, or too many invalid keys from the address. Carries retry_after.
503maintenanceKabal is in maintenance. Carries Retry-After.

Authentication explains the 401 and 403, Limits the 429 and 503.

An invalid parameter​

When a parameter cannot be read (a date that is not a date, an id that is not a UUID, date_to before date_from), the 400 has no code: it is a map from each wrong parameter to its messages.

{ "date_to": ["El fin es anterior al inicio."] }

Your program can tell the two kinds of 400 apart by the presence of code. Neither kind is worth retrying: fix the call.

What to retry​

StatusRetry?
400, 401, 403, 404No. The same call gets the same answer.
429Yes, after Retry-After seconds.
503 maintenanceYes, after Retry-After seconds.
502, 503 without a code, 504, a network errorYes, a few times with a growing wait. A call only reads, so repeating it is always safe.