Errors
Every error comes in the same shape:
{ "detail": "error_code" }
detail is a stable code meant for your code to compare against. It does not
change between versions and it never exposes internal table, host or database
names. Some codes carry an explanation after the colon
("rango_excedido: ventas admite hasta 366 dias por consulta (pediste 2193)"):
match on the prefix, not on the full string.
No error consumes units
Only 200 responses are billed. A 400, 403, 404, 429 or 503 adds
nothing to your invoice, so there is no reason to be shy about testing against
production. What does cost you is a request that succeeds but is useless:
an unfiltered list because you forgot the date range is a 200, and you pay for
it.
Reference table
| Code | What happened | What to do |
|---|---|---|
200 |
OK | — |
400 |
Invalid parameter, or outside the resource's limits | Fix the request. Do not retry as-is |
401 |
Key missing, invalid or revoked | Check the X-API-Key header |
403 |
Your key does not cover that database or resource | A scope issue, not a syntax one — but it may be a typo: see below |
404 |
The record does not exist, or that module isn't in use in your database | Check the id |
429 |
You went over the frequency limit | Wait and retry with backoff |
503 |
The replica is momentarily degraded | Retry according to Retry-After |
401 — who you are
detail |
Cause |
|---|---|
missing_api_key |
No X-API-Key header (sending it as a query string counts as not sending it) |
invalid_api_key |
The key does not exist |
key_inactive |
The key exists but has been revoked or disabled |
403 — how far you reach
detail |
Cause |
|---|---|
database_not_allowed |
That database isn't in your plan — or doesn't exist |
resource_not_in_scope |
That resource isn't in your plan — or doesn't exist |
ip_not_allowed |
The key is bound to fixed IPs and this one isn't on the list |
client_suspended |
The customer account is suspended (not the key) |
The 403 that surprises people
Two very different cases return the same error, deliberately:
- An account that isn't yours and an account that doesn't exist both give
database_not_allowed. If the message distinguished the two, the API would become a tool for finding out which companies are customers. - A resource you didn't buy and a misspelled resource both give
resource_not_in_scope. Which means/v1/your_account/vantasreturns403, not404.
So on an unexpected 403, the first move shouldn't be to email us but to look
at /v1/{account}/recursos, which lists exactly what your key can read, with
the exact spelling.
404 — nothing there
detail |
Cause |
|---|---|
not_found |
The record doesn't exist or the id isn't a number (/clientes/abc) |
resource_unavailable |
The resource exists in the API, but that module isn't in use in your database |
recurso_sin_listado |
That resource is a permission, not a listing (e.g. stock or ctacte_clientes): the response says where to query it (existencias, listado-cuotas-clientes…) |
resource_unknown |
You asked for the /schema of something with no published entry |
detail_not_supported |
That resource has no detail view |
raw_not_supported |
That part of the API is switched off on this installation |
About not_found with a non-numeric id: every Cianbox id is an integer, so
/clientes/abc is a 404. That request used to return 200 with a different
record — the first one in the default order — which is the kind of bug nobody
notices until it is already in a dashboard.
A document that isn't there: the 404 says why
When you ask for a document by id (/ventas/{id}, /cobros/{id},
/documentos/remito_compra/{id}…) and it isn't found, the 404 also carries
the reason. detail is still not_found (code that compares against it keeps
working); next to it come tipo, id, motivo and mensaje:
{
"detail": "not_found",
"tipo": "venta",
"id": 34940,
"motivo": "eliminado",
"mensaje": "El documento fue eliminado en Cianbox: los eliminados no se publican (los anulados sí). Un hueco entre ids suele ser un comprobante eliminado."
}
motivo |
What happened |
|---|---|
eliminado |
The document existed and was deleted in Cianbox. None of its data is published. Not the same as voided: a voided document does open, with estado: "anulado" |
inexistente |
There is no document with that id. Ids are not document numbers: look it up in the listing instead of trying ids one by one |
no_disponible |
The document exists but data needed to build it is missing (for example, a customer or a source document that don't exist) |
mensaje is in Spanish, written for an AI assistant to relay. It applies to
sales, purchases, collections, payments, orders, quotes, delivery notes
(sales, purchase and internal), purchase orders, payment plans, cheques, bank
movements, journal entries, service orders, subscriptions, serial numbers and
MercadoLibre orders. Records (customers, suppliers, products, brands,
categories), the MercadoLibre pack and a non-numeric id keep the plain 404,
without a reason. Like every error, it is not billed. A deleted document can
come back if someone restores it in Cianbox: then it opens again.
The 400s
The ones any list or detail request can return:
detail |
Cause |
|---|---|
fecha_invalida |
desde or hasta is not in YYYY-MM-DD format |
rango_invalido |
hasta is earlier than desde |
rango_excedido |
You asked for more days than the resource allows per query |
paginado_excedido |
page × limit exceeds the resource's skipped-rows cap |
id_invalido |
An id filter (id, id_cliente, …) contains something that isn't an integer |
filtro_invalido |
A text filter (documento, codigo_interno, …) came with no value at all (?documento=,) |
este recurso no soporta busqueda |
You sent buscar to a resource with no searchable fields |
este recurso no soporta filtro por fecha |
You sent desde/hasta to a resource with no date field |
The ones that only show up on raw tables (/v1/{account}/tablas/{table})
and non-curated resources — the ones that accept campos:
detail |
Cause |
|---|---|
campo no permitido |
You asked in campos for something that doesn't exist or isn't enabled |
campo no filtrable |
You filtered on a field that doesn't accept filters |
campo no ordenable |
You sorted by a field that isn't in ordenables |
direccion invalida |
The orden suffix is neither :asc nor :desc |
identificador invalido |
A field name with characters that aren't valid |
page debe ser >= 1 / limit debe ser >= 1 |
Pagination numbers out of range |
Curated resources return none of those first four. An
ordenor a filter they do not recognise raises no error: it is silently ignored, and the response comes back in the default order and unfiltered — billed like any other200. This is the costliest difference between a raw table and a curated resource: the raw table tells you, the curated one does not. Check that resource's page for theordenkeys and filters it actually accepts.
And the ones for reports (/v1/{account}/reportes/...): a malformed
parameter or a filter that doesn't apply gives 400 filtro_invalido: <reason>,
and the reason says what to fix. Each report's parameters are in
reports.
fecha_invalida, rango_invalido, rango_excedido, rango_requerido and
paginado_excedido are rejected without reaching the database, so the
response is immediate.
About id_invalido
Id filters take comma-separated integers (?id=1,2,3). If a single one isn't,
the whole request is rejected. It used to be dropped silently: ?id=1,abc,3
returned two rows as if you had asked for two, and ?id=abc returned the
unfiltered list and charged you for it. We would rather you saw it.
Extra commas (?id=1,,3, or with spaces) are not an error — they don't change
the filter. But a value that is only commas (?id=,) is, because it was the
same deception through another door: the list came out empty, the filter was
never applied, and you got the full listing billed as if it were what you asked
for.
In the /reportes/ reports and listings the rule is stricter: an empty
element inside the list (id_banco=3,, id_banco=, or id_banco=3,,5) is a
400 ("id_banco tiene un elemento vacío (para no filtrar, omitir id_banco)"),
because 0 is a valid id in some filters (the main taxpayer, "no channel") and
it has to be written. An empty filter, or one with only spaces, does not
filter. Report dates start at year 1000: 0999-12-31 or 0000-06-15 are an
invalid date.
Since 2026-10-13 the same goes for lists that are not ids: agrupar_por in
the grouped reports, incluir in /catalogos and origen in the
withholdings and perceptions listing. agrupar_por=mes,, incluir=cajas, or
origen=banco, are a 400 ("… inválido: elemento vacío (…)", with the
accepted values); the empty element used to be skipped (and in origen it was
taken as compra).
The 429s — frequency
There are two frequency limits, each with its own code:
detail |
What filled up |
|---|---|
rate_limited |
Your plan's per-minute allowance, across everything you query |
rate_limited_recurso |
The resource's own allowance, which is lower on the expensive ones |
The second one tends to surprise people: you can be nowhere near your plan's
limit and still hit a 429 by hammering an expensive resource or a heavy
report. Per-resource allowances are published as rate_limit_pm in each
/schema; null means "only your plan's limit applies". Reports have no
/schema: their allowance is on their section of reports.
A 429 carries no Retry-After: allowances refill continuously, so waiting
and retrying with backoff is enough. A 503 does carry it.
The 503s and what they mean
Each one carries a Retry-After header with the suggested number of seconds:
detail |
What is going on |
|---|---|
replica_no_disponible |
The replica is not responding. It recovers on its own shortly |
replica_atrasada |
The replica fell too far behind. We would rather cut than hand you stale data dressed up as current |
replica_atrasada_consulta_pesada |
The replica is somewhat behind: only the heavy resources are cut, the rest keeps working |
replicacion_detenida |
Replication has been stopped for more than 30 minutes. Short pauses (a backup, for instance) do not cut anything |
replica_en_mantenimiento |
Planned maintenance on that replica |
replica_fuera_de_servicio |
That replica has been disabled by hand |
replica_saturada |
Too much concurrency at that moment |
consulta_demorada |
Your query exceeded the resource's time limit |
replica_atrasada_consulta_pesada explains an otherwise baffling situation:
productos answers perfectly while ventas throws a 503 in the same minute.
The "heavy" ones are ventas, compras, cobros, pedidos
and nearly every report — the ones that sweep large tables.
They get cut first so the light stuff keeps working instead of everything going
down together. It is not your fault: once the replica catches up, it clears on
its own.
consulta_demorada is the only one on the list that does depend on your
request: each resource has its own execution cap (timeout_ms in the /schema,
between 5 and 25 seconds). Retrying as-is will fail the same way. What works is
narrowing the date range, adding filters, lowering limit, or — if what you are
doing is an aggregation — using the report that
already solves it.
Retries: what to do
429and503(exceptconsulta_demorada): retry with exponential backoff, honouringRetry-Afterwhen present. That is the correct behaviour.400,401,403,404andconsulta_demorada: do not retry. The same request will fail the same way; it needs fixing. Retrying in a loop only burns your frequency allowance and can end in a429.