Authentication
Every request carries your API key in the X-API-Key header:
curl -H "X-API-Key: YOUR_KEY" \
"https://api.cianbox.uno/v1/YOUR_ACCOUNT/productos"
The key goes in the header only. Passing it as a query string is deliberately
rejected: in a URL it ends up written to proxy logs, browser history and the
Referer of any outgoing request. An ?api_key=... is not merely ignored — the
request comes back 401 missing_api_key, as if you had sent nothing.
The header name is case-insensitive (x-api-key works just as well); the key
value is not.
What your key covers
Each key is bounded by three things, all enforced server-side:
- The databases you can read. Asking for another account returns
403 database_not_allowed, even if that account exists. The error is identical to the one for a non-existent account, so the API cannot be used to find out who else is a customer. - The resources you signed up for. If your plan covers stock and prices,
ventasreturns403 resource_not_in_scope. - Sensitive fields. Costs, margins and account balances only come through if
your profile enables them. Otherwise they are simply absent from the
response: no error, no warning, the field just isn't there. And there is no
way to request them via a parameter —
?campos=doesn't even apply to curated resources, so?campos=costochanges nothing.
A 403 that is usually a typo
resource_not_in_scope does not distinguish between "this resource isn't in
your plan" and "this resource doesn't exist". /v1/your_account/vantas and
/v1/your_account/compras (without having signed up for purchases) return
exactly the same thing. Same reasoning as with accounts: the API won't confirm
what exists on the other side.
In practice: before writing to us about a 403, check the spelling and check
/v1/{account}/recursos, which is the authoritative list of what your key
can read.
Reports have their own check
A report crosses several resources, so it needs
all of the ones it uses to be within your scope. clientes-sin-compras
reads customers and sales: with only one of the two signed up, it returns
403 resource_not_in_scope. A report cannot be a side door into data you
didn't buy.
Same story for money fields: productos-vendidos without the costos scope
gives you volume and revenue, but not profit. It still runs, just with fewer
columns.
Permission changes
When the permission a field requires changes, we note it here. A trimmed field
is not present in the response (it does not come as null): if your
integration reads it, make sure it tolerates its absence.
| Date | Where | Change | Effect |
|---|---|---|---|
| 2026-10-08 | reportes/cobros-agrupados |
total_no_imputado, residuos_no_imputados and imputado_de_mas (in totales and grupos) require the ctacte scope and the ctacte_clientes and ventas resources, as in the collection document and list |
Restricts: without that permission they are no longer returned |
| 2026-10-08 | reportes/pagos-agrupados |
total_no_imputado (in totales and grupos) requires the ctacte scope, as in the payment document and list |
Restricts: without the scope it is no longer returned |
| 2026-10-08 | plan_pago document |
Without the ctacte scope, resumen keeps cantidad_cuotas, cuotas_sin_factura, total and gastos (the financed amount, like a purchase's totals); paid, pending and due amounts still require ctacte |
Widens: before, the whole resumen was trimmed |
| 2026-10-09 | reportes/exceso-stock |
Also requires the ventas resource: it publishes what was sold and each product's daily sales (like stock-a-reponer with criterio=ventas) |
Restricts: without ventas, 403 |
| 2026-10-09 | reportes/dias-cobro-pago |
With de=cliente it also requires ventas; with de=proveedor, compras (both bases publish the invoiced amount and accept document filters) |
Restricts: without that resource, 403 |
| 2026-10-09 | reportes/flujo-fondos |
Estimated salaries and the year-end bonus (estimadas.sueldos, estimadas.aguinaldo and estimados.sueldos) require the new Sueldos (salaries) category, which no account has until it is enabled |
Restricts: without it they come as 0 and their assumption as null; the rest of the cash flow does not change |
devoluciones, total_cobrado and total_pagado in the grouped reports do
not change: they are money that came in or went out through the till.
Codes authentication can return
| Code | detail |
What happened |
|---|---|---|
| 401 | missing_api_key |
No header sent (or the key was passed as a query string) |
| 401 | invalid_api_key |
The key does not exist |
| 401 | key_inactive |
The key exists but has been revoked or disabled |
| 403 | client_suspended |
The customer account is suspended (not the key) |
| 403 | ip_not_allowed |
The key is IP-bound and this address isn't on the list |
| 403 | database_not_allowed |
That database isn't yours (or doesn't exist) |
| 403 | resource_not_in_scope |
That resource isn't in your plan (or doesn't exist) |
None of these consume units.
One key per integration
We recommend a separate key for each consumer: one for Power BI, one for an AI agent, one for an external agency. Concrete benefits:
- Each one can have a different scope. You can give the agency prices and stock without giving it your customers' account balances.
- They are revoked independently. If a vendor leaves, you cut that key and the rest keep working.
- Every request is audited per key, so you can see what each one asked for, from which IP and when.
- Usage is broken out per key in the /clientes panel: if spending jumps one month, you know which integration did it.
You create the extra keys yourself, from the /clientes panel: up to 10 active at a time, revoked from the same screen. They inherit your account's scope — the panel cannot widen it — so the first key, and any key that needs to reach different data, is one we issue. There is no charge for having several.
IP restriction
If your integration always calls from a fixed IP, we can tie the key to it. A
request from any other address returns 403 ip_not_allowed even with a correct
key. This is the most effective protection if a key ever leaks.
If a key leaks
Tell us and we revoke it immediately — the cut is instant, it does not wait for
any cache to expire. From that point the key returns 401 key_inactive. Then we
issue a new one. In the meantime we can go through that key's audit trail with
you to check for usage you don't recognise.