facturaBoAnular
Description
Section titled “Description”Cancels an invoice by its CUF with a SIAT catalog reason (1 badly issued invoice, 2 badly issued note, 3 wrong data, 4 returned) or reverts a cancellation (only if ANULADA; fires the factura.anulacion_revertida webhook).
Part of the Bolivia Fiscal Hub as an alternative to connecting directly to the SIAT: factura.bo (SimplifyIT S.R.L.) is a provider that builds and signs the XML and sends it to the SIN. Node: «Anular o revertir factura».
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | facturabo credential |
| operation | select | Yes | Action — cancel, revert |
| cuf | text | Yes | CUF — Unique Invoice Code (returned on issue) |
| motivo | number | No | Reason (code) — SIAT motivos_anulacion catalog |
| branch_code | number | No | Branch (SIAT code) — 0 = head office. Empty = the credential default branch |
| point_of_sale_code | number | No | Point of sale (SIAT code) — 0 = main point. Empty = the credential one |
| output_key | text | No | Output key — The result is added to data[key] keeping the rest of the data |
Credentials
Section titled “Credentials”This module requires a credential of type facturabo with the fields:
- API key: get it at app.factura.bo → More → API Key
- Environment: testing (sandbox, pilot SIAT) or production; the key does not reveal it, you choose
- NIT and SIAT system code: to sync CUIS/CUFD and catalogs
- Default branch and point of sale: 0 = head office / main point
- Webhook secret (
whsec_…): to verify event signatures
Output
Section titled “Output”{ "success": true, "operation": "cancel", "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74", "state": "ANULADA", "data": { "estado": "ANULADA" }, "environment": "production"}The output is stored under the configured key (output_key, default facturabo) and the rest of data is kept. On error: error.message, error.type and, where applicable, status and siat_code.
Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-facturabo", "operation": "cancel", "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74", "motivo": 1}- Reasons come from the
motivos_anulacioncatalog: 1 badly issued invoice, 2 badly issued note, 3 wrong data, 4 returned. - “Revert” is only possible if the invoice is
ANULADA(otherwise 409) and fires thefactura.anulacion_revertidawebhook. - If the invoice was issued at another branch or point of sale, say so; otherwise the credential ones are used.
Related Nodes
Section titled “Related Nodes”- facturaBoEmitirFactura - Emitir factura
- facturaBoNota - Nota de crédito/débito
- facturaBoConsultar - Consultar facturas