Cianbox API Castellano Request an API key

Billing and limits

You pay for what you use

Billing is per unit, not per request. And there is no single formula: everything is charged by the rows read. That is the first thing to get straight.

Data (resources, tables and reports)

units = resource weight + ceil(rows returned / 500)

The resource weight reflects how expensive it is to assemble: a composite resource that joins several tables weighs more than a plain read. It is a small, single-digit number — clientes weighs less than ventas. The second part makes fetching 5,000 rows cost more than fetching 50, but not a hundred times more.

Reports are charged the same way, with no separate fixed weight: the weight of the most expensive resource they need, plus the row block they read to build the result (not just the rows they return to you). A ranking of the 20 best-selling products over two years returns 20 lines, but it reads the groups of the whole period, and that is what counts.

That is why, for a total or a ranking, an aggregated report is the better deal: a single query, charged by the rows read like everything else. Pulling 44,000 sales rows to add them up on your side costs considerably more than asking for the total already computed. Each report states how it is charged on its own section.

What it cost, in the response

Listings, single-record detail and reports all return units_charged in the JSON — no estimating needed, that is the exact figure that was billed.

Raw tables (/v1/{account}/tablas/...) do not return it yet; for those, check your consumption in the panel.

What is not charged

You are only charged for what is delivered. If the response is not a 200, it consumes no units. No exceptions:

Situation Code
Missing, invalid or revoked key 401
Data you have not contracted, someone else's account, IP not allowed 403
Date range or pagination past the cap, malformed filter 400
Resource or record that does not exist 404
You went over your rate 429
Degraded replica or a query that took too long 503

A 400 for an oversized date range does not even open a connection to the database.

Your plan includes a monthly allowance of units; anything above it is billed as overage at your plan's rate.

Where to see what you have used

In your panel: https://api.cianbox.uno/clientes. It is the first screen — this month's usage against your allowance, day by day, and the breakdown of where it goes. Looking at it costs no units.

The current month updates live; closed months do not change — those are the ones used for invoicing. See your panel.

Three different limits

They complement each other and are worth keeping straight:

Frequency (per minute). Your plan sets how many requests per minute you can make. Go over it and you get 429. On top of that, each resource may have its own cap, and the one that applies is always the stricter of the two:

Date range per query. Each resource caps how many days you can ask for at once (366 days on resources; reports have their own). Going over returns 400 and the query never reaches the database.

Pagination depth. There is a cap on skipped rows (page × limit). Asking for page=90000 forces the engine to walk and discard millions of rows to hand you 50, so it is rejected with 400. The cap is not the same everywhere: most resources allow 50,000 skipped rows.

Where to see the exact caps

In each resource's /schema, under limites:

curl -H "X-API-Key: YOUR_KEY" \
  "https://api.cianbox.uno/v1/YOUR_ACCOUNT/ventas/schema"
"limites": {
  "rate_limit_pm": 300,
  "max_dias_rango": 366,
  "max_offset": 50000,
  "timeout_ms": 8000
}

A rate_limit_pm of null means that resource adds no cap of its own — only your plan's applies.

Reports have no /schema; their limits and parameters are in their section of reports and in the OpenAPI.

They are published precisely so you can check them before integrating. Each resource page in this portal shows them too.

How to pull a long history

The common mistake is bumping the page number all the way up. That is slow for you and expensive for the replica.

The right way is to walk forward by date range: ask for one month, page through that month until it is done, then move to the next. Each query starts light because the date filter shrinks the set before paginating.

# good: date ranges, short pagination within each range
.../ventas?desde=2026-01-01&hasta=2026-01-31&page=1&limit=200
.../ventas?desde=2026-02-01&hasta=2026-02-28&page=1&limit=200

# bad: deep pagination over the whole history
.../ventas?page=9000&limit=200

Syncing only what changed

?desde and ?hasta filter on that resource's date field, which is not the same one everywhere:

Resource ?desde / ?hasta filters on
productos updated — the modification date
clientes the creation date, even though /schema says updated
ventas, pedidos, presupuestos, cobros fecha — the document date
compras fecha_comprobante — the supplier's document date
services fecha_alta — when the job came in

The /schema publishes this under its fecha field, but not for all of them: on presupuestos and compras it comes back null even though the range does filter. If /schema says null, check that resource's page in this portal before concluding it takes no dates.

That difference changes how you sync: