Ventas (Sales)
Sales invoices. This is the resource for billing dashboards, profitability analysis and reconciliations.
GET /v1/{cuenta}/ventas is Cianbox's listing: headers from most recent
to oldest, with the same filters, amounts and states as the full
document, paginated by cursor (not
page/limit). The full content —line by line items, the issuer, related
credit/debit notes and delivery notes, delivery status— is fetched by id:
GET /ventas/{id} returns exactly the same as GET /documentos/venta/{id}.
Example
curl -H "X-API-Key: YOUR_KEY" \
"https://api.cianbox.uno/v1/YOUR_ACCOUNT/ventas?fecha_desde=2026-08-01&fecha_hasta=2026-08-31&limite=2"
{
"status": "ok", "module": "reporte:listado_ventas", "count": 6, "units_charged": 6,
"body": {
"listado_ventas": {
"parametros": {"fecha_desde": "2026-08-01", "fecha_hasta": "2026-08-31",
"tipo": ["factura", "nota_credito", "nota_debito"],
"incluir_anulados": false, "separar_por_moneda": false, "limite": 2},
"conversion": {"moneda": "ARS", "criterio": "cotizacion_de_cada_comprobante",
"comprobantes_convertidos": 0, "comprobantes_sin_cotizacion": 0},
"totales": [{"moneda": "ARS", "cantidad": 6, "total_neto": 82400.0}],
"sin_cae": [{"moneda": "ARS", "cantidad": 1, "total_neto": 9100.0, "desde": "2026-08-20"}],
"ventas": [
{
"id": 48210,
"comprobante": {"tipo": "Factura", "letra": "A", "punto_venta": 1, "numero": 1234,
"numero_completo": "Factura A 0001-00001234",
"contribuyente": {"id": 1, "razon_social": "Mi Empresa S.A.",
"cuit": "30-71234567-8", "condicion_iva": "Responsable Inscripto"}},
"fecha": "2026-08-15",
"cliente": {"id": 12401, "nombre": "Ferretería López S.R.L.",
"cuit": "30-12345678-9", "condicion_iva": "Responsable Inscripto"},
"sucursal": {"id": 1, "nombre": "Casa Central"},
"vendedor": {"id": 5, "nombre": "Juan Pérez"},
"forma_pago": {"id": 3, "nombre": "Contado Efectivo"},
"canal": null,
"moneda": "ARS",
"neto_sin_iva": 12727.27, "total": 15400.0,
"saldo_pendiente": 0.0, "saldo_vencido": 0.0,
"estado": "vigente", "estado_cae": "con_cae", "estado_cobranza": "saldada"
}
],
"paginacion": {"limite": 2, "siguiente_cursor": "2026-08-14:48198", "hay_mas": true}
}
}
}
What each row brings
cliente is the same object as in the document (id, name, tax id, VAT
category); sucursal (branch), vendedor (salesperson), forma_pago
(payment method) and canal (channel) are {id, nombre} or null if the
sale has no such data (e.g. no channel assigned).
| Field | What it is |
|---|---|
id |
The sale's id, to request GET /ventas/{id} |
comprobante |
Voucher type, letter, assembled number and the contribuyente (issuer) |
fecha |
The voucher's date |
cliente |
{id, nombre, cuit, condicion_iva} |
sucursal, vendedor, forma_pago, canal |
{id, nombre} or null |
moneda |
The sale's ISO code ("ARS", "USD"…) |
neto_sin_iva, total |
In the sale's currency; a credit note shows positive; a voided sale shows 0. On a letter C voucher the net is the total (without perceptions): a C invoice does not itemize VAT and everything is reported as exempt, even if Cianbox stored an internal VAT |
saldo_pendiente, saldo_vencido |
What's still owed and, of that, how much is overdue — only with the accounts-receivable permission (see below) |
estado |
"vigente" (active) or "anulado" (voided) |
estado_cae |
"con_cae", "pendiente_cae" or "sin_cae" if the point of sale is electronic-invoicing enabled; null if it isn't. A pendiente_cae sale is listed and counted in totales.cantidad, but doesn't add up in total_neto: it goes in sin_cae (see below) |
estado_cobranza |
"pendiente", "vencida" or "saldada" — only with the accounts-receivable permission; null on a voided sale. A balance under $ 100 (or 1 in another currency) is a rounding leftover: the sale is "saldada" (in the document, estado_cobranza.saldo_residual flags it) |
Cursor pagination, not page numbers
No page/limit. Every response carries paginacion.siguiente_cursor;
pass it back in ?cursor= for the next page. When there's no more,
siguiente_cursor is null.
.../ventas?fecha_desde=2026-01-01&fecha_hasta=2026-09-30&limite=100
.../ventas?fecha_desde=2026-01-01&fecha_hasta=2026-09-30&limite=100&cursor=2026-08-14:48198
limite accepts up to 1000 (default 50); never build the cursor by hand —
always use the one the previous call returned.
Filters
| Filter | What it does |
|---|---|
fecha_desde, fecha_hasta |
YYYY-MM-DD. With neither: the current month |
id_cliente, id_sucursal, id_vendedor, id_forma_pago, id_punto_venta, id_canal_venta, id_contribuyente, id_producto |
An id or a comma-separated list |
numero |
The voucher number, from any point of sale and type |
importe_desde, importe_hasta |
On the total as shown (credit note positive) |
moneda |
ISO code, as loaded |
letra |
The voucher letter (the one of the point of sale): A, B, C, E, M, P, R, S, T or X, case insensitive. Any other letter returns 400 |
tipo |
factura, nota_credito and/or nota_debito, comma separated. factura covers any sale that is neither a credit nor a debit note (invoices, non-fiscal sales, order notes) |
estado_cobranza |
pendiente (includes overdue), vencida or saldada — requires the ctacte_clientes resource, otherwise 403 |
estado_cae |
con_cae or pendiente_cae: only sales from electronic-invoicing points of sale, with or without a CAE. Only in this listing (in grouped sales and items it's a 400) |
incluir_anulados |
true/false (default false). A voided sale never adds up in totales |
separar_por_moneda |
true for totales per currency without converting, instead of unified into the main one (see below) |
A filter not on this list returns 400 filtro_invalido, unlike other
resources where an unknown filter is silently ignored.
The date range
Up to 12 months per query — unless you filter by id_cliente,
id_producto or numero, in which case, with no dates, it's the whole
history. Asking for more than 12 months without those filters returns
400, with the suggested maximum range in the message.
Everything in the main currency, unless you ask otherwise
totales comes back unified in your account's main currency,
converting each sale at the exchange rate it had when it was issued (not
today's rate). conversion tells you which currency and how many sales
were converted or were left with no rate on file (those don't add up). The
rows always show in each sale's own currency — they're never
converted; only totales and conversion change with
?separar_por_moneda=true (one group per currency, unconverted, and
conversion: null).
Electronic invoices without a CAE: listed, but they don't add up
A sale from an electronic-invoicing point of sale without a CAE
(estado_cae: "pendiente_cae") is not fiscalized: AFIP rejected it, or the
CAE was never requested, or it's still queued. It may end up re-invoiced or
voided, so counting it inflates the sales. Since 2026-11-02, it is listed
and counted in totales.cantidad, but doesn't add up in total_neto: it
goes apart, in sin_cae, a list per currency with cantidad, total_neto
(invoices + debit notes − credit notes, in the totals' currency) and desde
(the date of the oldest one); empty when there are none. Sales from
non-electronic points of sale add up as always.
# which ones still need to be fiscalized
.../ventas?fecha_desde=2026-01-01&fecha_hasta=2026-09-30&estado_cae=pendiente_cae
Why each one has no CAE is in the document: fiscalizacion.motivo is
en_proceso (queued for fiscalization), rechazada (AFIP stored errors) or
no_fiscalizada (never requested). What to do is to re-invoice or void it in
Cianbox, or request the CAE again if the error can be fixed. Meanwhile it
stays in the customer's account: collections and balances don't change. The
same rule applies to the sales
reports.
Collection status requires accounts receivable
estado_cobranza, saldo_pendiente and saldo_vencido on each row, and
the estado_cobranza filter, need the accounts-receivable permission
(ctacte_clientes). Without it:
- Filtering by
estado_cobranzareturns403 scope_ctacte_clientes_requeridodirectly (the query never runs — it's not a silent trim afterwards): the filter already decides which sales show up using money data. - Without that filter, the listing works fine, but each row comes back
without
estado_cobranza,saldo_pendienteorsaldo_vencido(missing, notnull).
Typical cases
# everything for one customer, no range limit
.../ventas?id_cliente=12401
# overdue sales this month
.../ventas?estado_cobranza=vencida
# a range including credit/debit notes and voided sales
.../ventas?fecha_desde=2026-08-01&fecha_hasta=2026-08-31&incluir_anulados=true
# invoices only (no credit/debit notes), above an amount
.../ventas?tipo=factura&importe_desde=10000
# the full history for one voucher number
.../ventas?numero=1234
# totals per currency, without unifying into the main one
.../ventas?separar_por_moneda=true
Sales items: one row per line, for exporting
GET /v1/{account}/ventas/items lists the lines of the sales, each with
its sale, customer, branch, salesperson, channel, product, brand, category,
line amounts and cost. It's the resource for building a dashboard or a BI
with the detail of what was sold.
curl -H "X-API-Key: YOUR_KEY" \
"https://api.cianbox.uno/v1/YOUR_ACCOUNT/ventas/items?fecha_desde=2026-08-01&fecha_hasta=2026-08-31&limite=1000"
Each item has id, venta (id, fecha, numero_completo, tipo,
id_contribuyente, estado_cae), cliente ({id, nombre}), sucursal, vendedor,
canal, moneda, cotizacion, tipo_item, producto (id, nombre,
codigo_interno, variante, vigente), marca, categoria,
descripcion, cantidad, precio_unitario, descuento_porcentaje,
neto_sin_iva, gravado, no_gravado, exento, iva_alicuota,
iva_monto, impuestos_internos, total, costo and id_lista_precio.
- Which items: those of each sale's document (current, without combo components: the combo is the line with the amount), of every type, from current, non-voided sales. The items add up to each sale's net.
- Sales without a CAE (since 2026-11-02): each item carries
venta.estado_cae(con_cae,pendiente_caeornullif the sale isn't electronic). Items ofpendiente_caesales are listed and counted intotales.renglones, but don't add up in units, net or cost: they go apart, insin_cae(per currency:renglones,unidades,neto_sin_ivaanddesde), which, like the totals, only comes on the first page (nullon the next ones). - Credit notes are positive, as in the document: subtract them by
venta.tipowhen adding up.costois the one stored at sale time, in the sale's currency;nullif it wasn't loaded (no data, not 0). Intotales,costois of the items with a cost, andrenglones_sin_costoandneto_sin_costocount those without one. - VAT by rate: each line has the net by tax treatment (
gravado,no_gravado,exento; they add up toneto_sin_iva) and itsiva_alicuota(21, 10.5, 27…; 0 for exempt and non-taxed), like the sale document. On a C invoice, everything is exempt and the rate is 0. - Filters: the same as the sales listing (except
incluir_anulados, which is a400: a voided sale has no items), plus the product'sid_marcaandid_categoria.id_productoreturns the items of that product or, for a parent, of its variants. Same date range rules. - Pagination: cursor
fecha:id_venta:id_item;limiteup to 1000 (default 200). totalesandconversiononly on the first page (withoutcursor): on the next pages they'renull. Keep them from the first one.- Permissions: requires the
ventasandproductosresources.costo(per item and intotales),renglones_sin_costoandneto_sin_costoonly with thecostospermission. -
Billing: the items on the page plus the
totalesrows (first page), with theventasweight. For long ranges, request one month at a time. -
Modified since a date:
modificado_desde/modificado_hastareturn the items of sales modified or with a modified item (for example, a corrected cost), without the default range; each row withfecha_modificacion. To sync, replace all items of every sale that shows up; voided and deleted sales have no items: see them in/ventaswith the same filter.
Rankings and time series: don't add them up by hand
For "who buys the most from me?", "how am I doing month by month?" or "which branch sells the most?", don't pull the whole listing to sum it — use reportes/ventas-agrupadas, which does the same calculation server-side for far fewer units.
How it's billed
By the sales on the page it returns, plus the totales of the whole
filtered set (name lookups and balances aren't counted — they're small
by-id queries). count in the response is that figure: what got billed,
weighted like the ventas resource.
Full document
GET /ventas/{id} returns the whole voucher in one call, built to be read
as-is — by a person or an AI: the assembled number
(Factura A 0001-00001234), the issuer, the customer with a formatted tax
id, line items with combos nested inside, related vouchers (its credit and
debit notes), the delivery notes that fulfilled it, and collection and
delivery status. Credit notes come back inverted, positive; a voided
voucher comes back with anulado status and amounts at 0.
.../ventas/48210
Collection status only shows up if your key can read accounts
receivable and has the ctacte scope. Each item's cost only shows up
with the costos scope (null if it wasn't loaded at sale time). On an
electronic sale, fiscalizacion carries the estado (con_cae,
pendiente_cae or sin_cae), the CAE and its expiry, and motivo when it's
pending: en_proceso, rechazada or no_fiscalizada (null with a CAE, or
if the point of sale isn't electronic).
All document types, their permissions and how they're billed: Full documents.
Incremental sync
modificado_desde and modificado_hasta (YYYY-MM-DD or
YYYY-MM-DD HH:MM:SS) return only what changed in that range, without the
default date range and including deleted records: the sale comes with
"estado": "eliminado" and amounts at 0 when deleted, so you can remove your
copy, and voided ones are included unless incluir_anulados=false.
Every row carries fecha_modificacion; totales count only current
records. Step by step: Reports → incremental
sync.
.../ventas?modificado_desde=2026-10-07%2009:15:00&limite=1000
Reference
Generated from the API's own schema, so it always reflects the real state.
Available fields
Can be filtered by
Can be sorted by
Use a hyphen and a direction: orden=fecha-desc, orden=id-asc. An orden the resource does not recognise — including the field:desc form, which belongs to raw tables — raises no error: you get the default order back. If the order matters, check the first row.
Text search looks at
Date field (for desde/hasta)
Limits
| Own rate limit | 300 req/min |
| Max range per query | 366 days |
| Max pagination depth | 50,000 skipped rows |
| Rows per page | up to 1000 |
Code examples
curl -H "X-API-Key: TU_KEY" \
"https://api.cianbox.uno/v1/TU_CUENTA/ventas?limit=50"import requests
r = requests.get(
"https://api.cianbox.uno/v1/TU_CUENTA/ventas",
headers={"X-API-Key": "TU_KEY"},
params={"limit": 50},
timeout=30,
)
r.raise_for_status()
for fila in r.json()["body"]:
print(fila)const r = await fetch(
"https://api.cianbox.uno/v1/TU_CUENTA/ventas?limit=50",
{ headers: { "X-API-Key": "TU_KEY" } }
);
if (!r.ok) throw new Error(`HTTP ${r.status}`);
const { body } = await r.json();
console.log(body);