Skip to content

cucuAnular

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”.

FieldTypeRequiredDescription
credentials_idcredentialsYescucu credential
modeselectYesAction — invoice, administrative, note, revert
invoice_idtextNoInvoice ID (UUID) — The id CUCU returns on issue. If empty, set the CUF
cuftextNoCUF — Unique Invoice Code. Used when no ID is given
motivonumberNoReason (code) — SIAT cancellation-reasons catalog. For notes: 1 data error, 2 return, 3 later period, 4 other
administrative_resolutiontextNoAdministrative resolution — Required for late cancellation: number of the approval resolution notified by the SIN
output_keytextNoOutput key — The result is added to data[key] keeping the rest of the data

This module requires a credential of type cucu with the fields:

  • API key: starts with sk_test_ (sandbox) or sk_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
{
"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.

{
"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.