SiatObtenerCufd
Description
Section titled “Description”Gets the CUFD (Daily Unique Invoicing Code) from the SIN’s SIAT in Bolivia, valid for 24 hours, together with its control code. This code is a mandatory prerequisite to issue or cancel invoices: without a valid CUFD, no other node in the SIAT module can operate.
Optionally, the node can also obtain the CUIS (System Startup Unique Code), if the credential doesn’t have one saved yet. It’s recommended to run this node at the start of each invoicing day, before issuing the first invoice.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | siat credential |
| obtener_cuis | boolean | No | Also get the CUIS (if you don’t have one). Defaults to false |
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”{ "cuis": "20260805AB1", "cufd": "ABCDEFGHIJK0123456789LMNOPQRSTUVWXYZ", "codigoControl": "A1B2", "direccion": "Av. Ejemplo 123", "fechaVigencia": "2026-08-06T08:00:00"}Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-siat-prod", "obtener_cuis": true}- The CUFD expires after 24 hours; it must be renewed at the start of each day before issuing invoices.
- If
obtener_cuisis not set and there’s no CUIS saved in the credential, the node still tries to get one, but it does not fail the run if it can’t. - If the SIN does not return the CUFD or the control code (for example due to an invalid apikey), the node ends with an error.
- The result (
cufd,codigoControl,cuis) is meant to be passed on as input to SiatEmitirFactura or SiatAnular in the same workflow.
Related Nodes
Section titled “Related Nodes”- SiatEmitirFactura - Issue an invoice using the obtained CUFD
- SiatAnular - Cancel an invoice (also requires a valid CUFD)