Skip to content

Items & catalog

Items are your reusable product/service catalog. They aren’t required to invoice (you can send ad-hoc lines), but they speed up emission and keep CAByS + tax defaults consistent.

Ventana de terminal
GET /v1/tenants/:tenantId/items
POST /v1/tenants/:tenantId/items
PATCH /v1/tenants/:tenantId/items/:id
DELETE /v1/tenants/:tenantId/items/:id

(Plus variant and price sub-resources under the same base.)

  • An item carries the shared attributes: name, CAByS code, unit of measure, default taxes.
  • A variant is a concrete sellable (size/color/SKU). An item has one or more.
  • A price is its own entity: (variant, currency) → unitPrice. Prices are sparse — a product can have a CRC price only, with USD enabled but unpriced.
{
"prices": [
{ "currency": "CRC", "unitPrice": 10000 },
{ "currency": "USD", "unitPrice": 20 }
]
}

On a variant, prices replaces the whole set — with one deliberate exception: a currency that is disabled on the tenant can’t be edited (or even rendered) anywhere, so omitting it from a replace payload means “untouched”, not “delete”. Dormant rows in disabled currencies are preserved verbatim and revive on re-enable; only absent enabled currencies are removed. Sending a price in a disabled currency is still rejected (CURRENCY_NOT_ENABLED). “Offerable in currency X” is derived — an active price in X exists and X is in the tenant’s enabled currencies.

An invoice has exactly one currency, and each line’s price is read directly from the (variant, invoiceCurrency) row — never converted from another currency at emission time. FX (BCCR) only supplies the document’s fiscal TipoCambio and an editable seed when you first set a price; it never derives the price you charge.

Each item carries a 13-digit CAByS code. Use the lookup endpoints to find codes and their authoritative IVA:

Ventana de terminal
GET /v1/cabys/search?q=camiseta # discovery (local ~20k catalog)
GET /v1/cabys/:codigo/suggested-iva # authoritative IVA from Hacienda

Drop the suggested taxCode / codigoTarifa / tarifa onto the item’s default tax. Items can also carry secondary/excise taxes (with their per-unit datosEspecifico) — see Excise taxes.

An item can be a surtido (a combo whose price is locked to the sum of its components). Components carry per-currency prices just like variants, with two enforced rules: every component must have a price in the same set of currencies (uniform coverage — the surtido total must reconcile with the component sum in the invoice currency), and the variant price is derived (Σ qty × price per currency), never written directly — direct price writes on a surtido variant are rejected with SURTIDO_PRICE_DERIVED. At invoice time each component expands with its price in the invoice’s currency.