SiatAnular
Description
Section titled “Description”Cancels a previously issued invoice in the SIN’s SIAT in Bolivia, identifying it by its CUF (Unique Invoicing Code) and providing a reason code from the SIN’s official catalog (for example, an invoice issued by mistake or a correction via a credit-debit note).
Just like issuance, cancellation requires a valid CUFD (either passed in or taken from the credential); without it, the node never reaches out to the SIN. Once the SIN confirms the cancellation, the document’s internal status becomes cancelled.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | siat credential |
| cuf | text | Yes | CUF of the invoice to cancel |
| codigo_motivo | text | Yes | Cancellation reason code (SIN catalog). Defaults to “1” |
| cufd | text | No | Valid CUFD (if not in the credential) |
Credentials
Section titled “Credentials”This module requires a siat credential type with the following fields:
- Digital certificate (.p12): signing certificate, or alternatively private key + certificate in PEM
- Certificate password: password for the .p12 file
- Issuer NIT: tax ID of the company issuing invoices
- SIN token/apikey: access token for the SIAT services (or delegated token)
- Environment: testing/pilot or production
Output
Section titled “Output”{ "cuf": "8A1B2C3D4E5F60718293A4B5C6D7E8F9", "estado": "cancelled", "codigoMotivo": "1"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-siat-prod", "cuf": "8A1B2C3D4E5F60718293A4B5C6D7E8F9", "codigo_motivo": "1", "cufd": "ABCDEFGHIJK0123456789LMNOPQRSTUVWXYZ"}- Requires a valid CUFD (either passed in or taken from the credential); without it, the node stops before calling the SIN.
- The reason code follows the SIN’s official catalog (for example 1 for an invoice issued by mistake); it’s worth checking the current catalog before cancelling.
- If the SIN rejects the cancellation, the node returns an error with the received messages and the document keeps its previous status.
- Once confirmed, the document’s internal status (issued invoices table) becomes
cancelled.
Related Nodes
Section titled “Related Nodes”- SiatEmitirFactura - Issue the invoice that gets cancelled later
- SiatObtenerCufd - Get the valid CUFD needed to cancel