Facturiadocs
Issuing

Statuses

The seven public statuses, how the SII's two layers of signals map onto them, and what each rejection means.

The seven public statuses

                      ┌───────────► rejected  (terminal)
                      │
queued ──► sent ──────┼───────────► reparo    (terminal-ish; válido pero observado)
   │                  │
   │                  └───────────► accepted ──► annulled (una NC lo anuló)
   │
   └──► failed ──(retry)──► queued

The last column is membership in the consumption ledger, not price: it says whether the document gets recorded there. On a flat plan that is a count, not a charge.

statusMeaningTerminalIn the consumption ledger
queuedWe have it. Assigning a folio (the pre-authorised sequential number the document must carry), building and signing the XML — a document in queued may not have a folio yetnono
sentTransmitted to the SII, Chile's tax authority; we have a track_id and we are pollingnono
acceptedThe SII has the document and the data matchesyesyes
reparoThe SII has it but flagged discrepancies. Legally issued; worth a lookyesyes
rejectedThe SII rejected it. Not a valid document; the folio is burnedyesno
failedWe could not build, sign or transmit it. Retriablenono
annulledA credit note with code 1 annulled it (ours or a counterparty's)yesalready recorded

Trap

reparo is not a rejection, and you still care

A document in reparo is legally issued and recorded in the ledger: the SII has it. What it says is that the data you declared does not match exactly what the SII calculated. Check it — it is usually a total, and it usually shows up again as a difference when you close the period.

How the SII's signals map

Two SII layers produce these statuses: the envelope status (per upload, by track_id) and the per-document status (getEstDte, by RUT + type + folio + date + amount). We read both and publish a single status.

SII signalLayerPublic statusNote
upload accepted, track_id returnedenvelopesent
REC / EPRenvelopesentEnvelope received / in process. EPR on its own does not mean the document was accepted
SOKenvelopesentSchema OK; the per-document verdict is still pending
RCT, RFR, RSC, RCH, SRHenveloperejectedRejection at the envelope level: its carátula (the header block), its schema, its signature. rejection_reasons carries the SII's code
DOK (err 0)documentacceptedDocument received by the SII, data matches. The success state
DNK (err 1)documentreparoReceived, the data does not match. We re-query once with canonicalised parameters before publishing, so a DNK you see is a real discrepancy, not an artefact of the query
FAU (err 3)documentstays sentNot at the SII yet; we keep polling
FNA (err 4)documentrejectedDocument not authorised
FAN (err 5)documentannulledDocument annulled
EMP (err 6)documentrejectedEmpresa not authorised to issue DTEs (documentos tributarios electrónicos, Chile's electronic tax documents) — an onboarding problem, which shows on the empresa too
TMD/TMC (10/11)documentacceptedA debit or credit note (ND/NC) modifies text; exposed as sii.modified_by
MMD/MMC (12/13)documentacceptedA debit or credit note modifies amounts
AND/ANC (14/15)documentannulledA debit or credit note annuls it
boleta RPR / RLVdocumentreparoReparos from the boleta channel — the consumer-receipt DTE
001/002/003, -1…-4transportno changeToken or transient errors. We re-authenticate and retry; you never see them

`EPR` does not mean accepted

It is the most common misreading of the SII. EPR means "envelope in process": the envelope arrived and is being processed. The verdict that matters comes from the per-document layer, and the one you want is DOK.

A document's events

Every transition writes an event you can read and, if you have an endpoint, a webhook.

curl https://api.facturia.cl/v1/documents/doc_01K2R7.../events \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA"
{
  "object": "list",
  "data": [
    { "type": "document.created",  "at": "2026-08-14T13:04:11Z", "detail": { "folio": 412 } },
    { "type": "document.sent",     "at": "2026-08-14T13:04:19Z", "detail": { "track_id": "0252083112" } },
    { "type": "document.accepted", "at": "2026-08-14T13:06:55Z", "detail": { "estado": "DOK", "num_atencion": "8812394" } }
  ]
}

Rejection reasons

Rejections come with a structured list, each entry carrying a stable Facturia code, the raw SII code and whether retrying might help.

"rejection_reasons": [
  {
    "code": "ted_signature_invalid",
    "sii_code": "TED-2-510",
    "message": "Firma del timbre electrónico incorrecta",
    "hint": "El DD del timbre fue alterado entre la firma y el envío.",
    "retriable": false
  }
]

The codes you will run into most:

Facturia codeSII codeCause
schema_invalidSCH-00001Envelope schema rejected
caratula_invalidRCTBad data in the carátula (often FchResol / NroResol)
ted_signature_invalidTED-2-510The electronic stamp's signature does not match
field_invalidHED-3-211A header field carries a value the SII rejects
signer_not_authorizedupload estado 1 / ESTADO 6The signing certificate is not an authorised user of the empresa
emisor_not_authorizedEMPEmpresa not authorised to issue this document type
document_not_authorizedFNAFolio outside an authorised CAF (código de autorización de folios, the SII-signed block of folios), or a revoked CAF
totals_mismatchDNKThe amounts you sent differ from the ones the SII calculated

The full dictionary is in Errors · Codes, with a machine-readable copy at GET /v1/error_codes (no authentication).

Polling vs. webhooks

Webhooks are the intended integration. If you have to poll anyway:

  • Do not call GET /v1/documents/{document_id} more often than every 10 seconds for the first 2 minutes, then every 60 seconds. Typical time to a terminal status is 30 seconds to a few minutes; the SII can take hours during peaks or maintenance.
  • Better: query the list with status=sent&created_at[gte]=… once a minute and reconcile in bulk.
  • The Facturia-Poll-After header on the document response tells you the next useful moment, derived from our own scheduler.

On this page