Facturiadocs
Issuing

Actions on a document

Retry, email, annul and ask about cesibilidad — what you can do to a document once it has been issued.

Retry

For a document in failed — you ran out of folios (the pre-authorised numbers a document must carry), the certificate expired, the SII (Chile's tax authority) was down.

curl -X POST https://api.facturia.cl/v1/documents/doc_01K2R7.../retry \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA"

It reuses the folio already assigned. It never creates a second document.

Send by email

curl -X POST https://api.facturia.cl/v1/documents/doc_01K2R7.../send \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA" \
  -H "Content-Type: application/json" \
  -d '{"to":["[email protected]"],"attach":["pdf","xml"]}'

If you would rather it went out only once the document reaches accepted, set email_document_to on the receptor when you issue and do not call this endpoint.

Annul a document

Trap

In Chile there is no “deleting a factura” (an issued invoice)

Annulling means issuing a credit note that references the original with code 1. This convenience endpoint issues it for you, but the result is a new document, with its own folio, and the original stays in the record forever. There is no DELETE that makes it disappear, and there never will be.

curl -X POST https://api.facturia.cl/v1/documents/doc_01K2R7.../credit_note \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA" \
  -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"code":1,"reason":"Anula factura por acuerdo comercial"}'

The endpoint returns a new document (type 61) and links the two: the original gains annulled_by and the note carries references[0].

code: 2 (corrects text) and code: 3 (corrects amounts) are accepted too; with code: 3 you pass items with the corrected amounts.

Ask whether it is cedible

curl -X POST https://api.facturia.cl/v1/documents/doc_01K2R7.../cesion \
  -H "Authorization: Bearer $FACTURIA_KEY" -H "Facturia-Empresa: $EMPRESA"

It asks the SII's registry whether that factura can be ceded to a factoring company and stores the answer in the document's cesion object. It is read-only: it cedes nothing. All the detail — the codes, the two rejections and why this is not the same as the printed cedible copy — is in Cesibilidad.

What does not exist

  • There is no PATCH on an issued document. An accepted DTE (documento tributario electrónico, Chile's electronic tax document) is a tax record.
  • There is no DELETE. See above.
  • There is no "resend to the SII" separate from retry: if the document is rejected, the folio is burned and the right move is to issue a new one with corrected data.

On this page