cucuAnular
Description
Section titled “Description”Cancels an invoice within the deadline (up to the 9th of the month after issue), outside the deadline with the SIN Administrative Resolution, cancels a credit/debit note (irreversible) or reverts a cancellation (back to VALIDATED). Identified by ID or CUF.
Part of the Bolivia Fiscal Hub as an alternative to connecting directly to SIAT: CUCU is an authorised provider handling signing, CUIS/CUFD codes and submission to the SIN. Node: “Anular o revertir factura”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| mode | select | Yes | Action — invoice, administrative, note, revert |
| invoice_id | text | No | Invoice ID (UUID) — The id CUCU returns on issue. If empty, set the CUF |
| cuf | text | No | CUF — Unique Invoice Code. Used when no ID is given |
| motivo | number | No | Reason (code) — SIAT cancellation-reasons catalog. For notes: 1 data error, 2 return, 3 later period, 4 other |
| administrative_resolution | text | No | Administrative resolution — Required for late cancellation: number of the approval resolution notified by the SIN |
| 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 cucu with the fields:
- API key: starts with
sk_test_(sandbox) orsk_live_(production); the environment is inferred from the prefix - Environment: automatic, testing or production (if it contradicts the key, nothing is sent)
- Default point of sale (UUID): used when the node does not specify one
- Company ID (UUID): for branches and certificate status
- Webhook secret (
whsec_…): to verify event signatures
Output
Section titled “Output”{ "success": true, "mode": "invoice", "state": "CANCELLED", "cancellation_type": "SIAT", "invoice": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "invoiceNumber": 1, "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74", "state": "CANCELLED", "amountTotal": 500 }}The output is stored under the configured key (output_key, default cucu) and the rest of data is kept. On error: error.message, error.type and, where applicable, status, code and siat_code.
Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-cucu", "mode": "invoice", "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74", "motivo": 1}- Normal cancellation is only possible until the 9th of the following month. Outside the window (
CANCEL_OUT_OF_WINDOW) use administrative cancellation with the SIN resolution. - Cancelling a credit/debit note is irreversible. “Revert” returns the invoice to
VALIDATED. - The invoice can be identified by ID (UUID) or by CUF.
Related Nodes
Section titled “Related Nodes”- cucuEmitirFactura - Emitir factura
- cucuNotaCreditoDebito - Nota de crédito/débito
- cucuConsultar - Consultar facturas