Getting started
A read-only REST API over your Cianbox account data. Built for Power BI, dashboards, integrations and AI agents.
- Base URL:
https://api.cianbox.uno - Authentication: an
X-API-Keyheader on every request - Format: JSON
Shortcut: download the Postman collection with every endpoint, filter and expected error already set up. Import it, fill in
cuentaandapi_keyin the collection variables, and you are querying in a minute. It is generated from the API's own schema, so it is never stale.
Your first request
curl -H "X-API-Key: YOUR_KEY" \
"https://api.cianbox.uno/v1/YOUR_ACCOUNT/productos?limite=5"
YOUR_ACCOUNT is the name of your Cianbox account (for example, youraccount).
If you don't know it, we send it along with the key.
What you can query
curl -H "X-API-Key: YOUR_KEY" \
"https://api.cianbox.uno/v1/YOUR_ACCOUNT/recursos"
This returns exactly the resources your key is allowed to read, with their fields, filters and limits. If you signed up for stock and prices, purchases and payroll will not show up: the limit is enforced server-side, it does not depend on your code behaving well.
There are three things to query today:
- Curated resources —
clientes,productos,ventas,pedidos,presupuestos,compras,proveedores,cobros,servicesand more. These come pre-assembled: the customer with their sales rep and zone, the invoice with its line items, the product with its price lists and per-branch stock.stockandctacte_clientesare not listings: they are permissions you sign up for. Stock is read through theexistenciasandstock-a-reponerreports; customers' current accounts, throughlistado-cuotas-clientes,antiguedad-saldosandcuenta-corriente-cliente. - Reports — pre-aggregated queries, and the cheap route for most business questions. See below.
- 178 raw tables — the table exactly as it sits in the database, for anyone
who would rather assemble it themselves. They live under
/v1/{account}/tablas/{table}.
The full catalogue, with a page per resource, is in what you can query.
Before you pull 40,000 rows: look at the reports
Almost every business question ("what sells most", "who hasn't bought in three months", "which category earns the most") is already solved as a report. They return the result already computed, in a single query: pulling a year of sales to add them up on your side costs far more than asking for the report.
# best-selling products of the period
curl -H "X-API-Key: YOUR_KEY" "https://api.cianbox.uno/v1/YOUR_ACCOUNT/reportes/productos-vendidos?agrupar_por=producto&fecha_desde=2026-01-01&fecha_hasta=2026-08-31"
# sales by month
curl -H "X-API-Key: YOUR_KEY" "https://api.cianbox.uno/v1/YOUR_ACCOUNT/reportes/ventas-agrupadas?agrupar_por=mes&fecha_desde=2026-01-01&fecha_hasta=2026-08-31"
The small catalogues (price lists, branches, zones, customer categories, order
statuses, seasons) come in GET /v1/{account}/contexto, which is free. Each
report is detailed in reports.
The endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /v1/{account}/recursos |
Which resources you can query |
| GET | /v1/{account}/{resource} |
Paginated list |
| GET | /v1/{account}/{resource}/schema |
Fields, filters, sorting, search and limits |
| GET | /v1/{account}/{resource}/{id} |
One record with its nested lines |
| GET | /v1/{account}/contexto |
Company, small catalogues (price lists, zones, order statuses…) and the account's modules. Free |
| GET | /v1/{account}/reportes/{report} |
A report already computed: ventas-agrupadas, compras-agrupadas, cobros-agrupados, pagos-agrupados, productos-vendidos, existencias, stock-a-reponer, clientes-sin-compras, antiguedad-saldos, tiempos-service, saldos-caja, saldos-bancos, cupones-a-acreditar… |
| GET | /v1/{account}/reportes/cuenta-corriente-cliente/{id} |
A customer's account statement (and cuenta-corriente-proveedor/{id} for a supplier) |
| GET | /v1/{account}/tablas/{table} |
One raw table, exactly as stored |
Everything is a GET: there is no way to write to your data from here, not even
with the wrong key.
List parameters
| Parameter | Example | What it does |
|---|---|---|
limit |
limit=100 |
Rows per page (capped per resource) |
page |
page=2 |
Page, starts at 1 |
orden |
orden=fecha-desc |
Sort (key-asc / key-desc) |
buscar |
buscar=ADATA |
Text search |
desde / hasta |
desde=2026-01-01&hasta=2026-01-31 |
Date range |
<field> |
id_cliente=42 |
Filter by equality |
campos |
campos=id,producto |
Raw tables only. Return just these fields |
What each resource accepts is listed in its /schema, and also on that
resource's page in this portal. Parameter names stay in Spanish — they are part
of the API contract, so translating them would break every integration.
Five things about parameters worth knowing up front:
ordenuses a hyphen, not a colon, and the key has to exist. On curated resources it isorden=fecha-desc,orden=total-asc,orden=id-desc: a fixed set of keys per resource, listed on that resource's page in this portal. Send anything the resource does not recognise —orden=fecha:desc,orden=fecha, or a field that is not on its list — and you get no error: you get its default order and the response looks fine. This is the costliest mistake here, because "the latest 200 sales" can quietly be the oldest 200. The colon form (orden=field:desc) belongs to raw tables, which do validate it and return400when the field or the direction does not exist.camposdoes not apply to curated resources. A curated resource always returns its full shape — price lists, line items, per-branch stock — because that shape is exactly what you are paying for.camposworks on/v1/{account}/tablas/{table}, where you assemble the selection yourself. Sending it to a curated resource breaks nothing: it simply does not change the response, and it does not change what you are charged either. If you want a smaller response, lowerlimitor add filters.limitis capped per resource (limite_maxin the/schema, 200 for almost all of them). Asking forlimit=500does not return 500 rows: it returns 200. Page through withpage.buscarsearches literal text. The wildcards are not yours:buscar=%looks for records containing a%sign, not "everything". If you want everything, do not sendbuscar.- Id filters take comma-separated integers, and nothing else.
?id=1,abc,3returns400 id_invalidoinstead of quietly filtering by two out of three. Extra commas (?id=1,,3) are fine.
Response shape
For ?limit=50&page=1 on a resource with the generic contract (ventas,
compras, cobros, pagos, presupuestos, pedidos, productos,
clientes, proveedores, services, abonos, asientos, valores,
movimientos_bancarios, ml_ventas, marcas and categorias are Cianbox listings with limite and
cursor: see their pages):
{
"status": "ok",
"account": "youraccount",
"module": "marcas",
"page": 1,
"limit": 50,
"count": 50,
"has_more": true,
"available_fields": ["id", "producto", "descripcion"],
"units_charged": 3,
"body": [ { "id": 1, "producto": "..." } ]
}
countis the number of rows on this page.has_moreistruewhen the page came back full, meaning the next one is worth asking for. There is deliberately nototal_pages: it would require aCOUNT(*)on every request over tables with millions of rows, making every query more expensive for a number almost nobody uses. It is computed against thelimityou sent. If you omitlimit, the resource falls back to its default (50 rows) buthas_morestill comes backfalse, even with thousands of rows left. That is why an explicitlimitis not a style detail.units_chargedis what that request cost you. It ships with every response so you never have to wait for the invoice to know what you are spending; the formula is in billing and limits.
To page safely, always send an explicit limit and keep asking for pages while
count equals the resource's effective limit.
Data comes from a replica, so it lags slightly behind. This is not a live transactional view, and that is deliberate: reading from the replica is what lets you query without weighing on your business's day-to-day operation.
When something fails
A resource your key hasn't signed up for — and a misspelled resource name too —
returns 403, not 404. So if /v1/your_account/vantas gives you a 403,
check the spelling before asking us to widen the plan. Every code is listed in
errors.
Also worth knowing
- Self-service panel: at /clientes you log in and see your own usage for the month, per key and per resource, without waiting for the invoice.
- MCP server: if you work with AI agents, the API plugs in directly at
/mcp. See MCP.
Before you write the integration
Read billing and limits — there are caps on
date ranges and pagination depth per resource, and it is better to plan for them
than to discover them with a 400 in production.