Facturiadocs
Tax

Registro de Compras y Ventas

How we sync the SII's RCV, what it gives you back, and what happens when the SII changes something underneath.

Everything in this chapter runs on a certificate-authenticated session against the data area of the SII itself, Chile's tax authority.

There is no clave tributaria in Facturia

We don't ask for the clave tributaria — the taxpayer's password for the SII portal — we don't store it, and we don't need it. The empresa's digital certificate is the credential for everything: signing DTEs (documentos tributarios electrónicos, Chile's electronic tax documents), minting SII tokens, reading the RCV (the registro de compras y ventas, the purchase-and-sales register the SII keeps for you) and filing acknowledgements.

Reading the RCV

curl -G https://api.facturia.cl/v1/tax/purchases \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA" \
  -d period=2026-07 -d estado_contable=REGISTRO -d limit=100
{
  "object": "list",
  "url": "/v1/tax/purchases",
  "data": [
    {
      "id": "rcv_01K2RB7Q2M4X",
      "object": "rcv_entry",
      "direction": "purchase",
      "period": "2026-07",
      "tipo_dte": 33,
      "folio": 8812,
      "counterparty": { "rut": "96790240-3", "legal_name": "Proveedor Austral SpA" },
      "issue_date": "2026-07-12",
      "receipt_date": "2026-07-12",
      "amounts": { "net": 450000, "exempt": 0, "iva": 85500, "iva_no_recuperable": 0, "other_taxes": 0, "total": 535500 },
      "estado_contable": "REGISTRO",
      "characterization": { "tipo_compra": "del_giro", "iva_uso_comun": false, "iva_no_recuperable_code": null },
      "received_document_id": "rdoc_01K2R9M3D8V5QW7N",
      "synced_at": "2026-08-14T06:12:03Z"
    }
  ],
  "has_more": true,
  "next_cursor": "cur_01K2RB7Q2M4X",
  "sync": { "last_synced_at": "2026-08-14T06:12:03Z", "status": "fresh", "period_closed": false }
}

GET /v1/tax/sales is symmetric.

Filters: period, tipo_dte, counterparty_rut, folio, estado_contable (REGISTRO, PENDIENTE, NO_INCLUIR, RECLAMADO) and issue_date[gte|lte].

Always look at the `sync` block

sync.last_synced_at and sync.status tell you how old the numbers you are reading are. A status: degraded means the sync with the SII is having trouble — see below.

The aggregate

curl -G https://api.facturia.cl/v1/tax/summary \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA" -d period=2026-07

This is the view the F29 — Chile's monthly IVA return — is computed from.

Forcing a sync

It normally runs on its own, on the empresa's rcv_sync_frequency.

curl -X POST https://api.facturia.cl/v1/tax/sync \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA" \
  -H "Content-Type: application/json" -d '{"period":"2026-07"}'

Returns 202 with a job. The tax.rcv.synced event carries the counts and a changed flag.

The honest note about this surface

Trap

The RCV is not a published, versioned web service

The read and write path for the RCV is the backend of the SII's own portal. We pin it, we cover it with contract tests, and it is the same API every Chilean provider consumes — but if the SII changes it, sync.status turns degraded and we tell you so, right there on the empresa, instead of quietly serving you stale numbers.

Design for that: if your period close depends on the RCV, check sync.status before you believe the figures.

On this page