SiatEmitirFactura
Description
Section titled “Description”Issues a sale Electronic Invoice to the SIN’s SIAT in Bolivia. The node generates the CUF (Unique Invoicing Code) from the issuer’s NIT, the issuance date and the day’s CUFD, builds the invoice XML, digitally signs it with XMLDSig using the credential’s certificate, and performs the reception over SOAP with the body compressed in GZIP.
It requires a valid CUFD (previously obtained with SiatObtenerCufd): without it, the node does not build or send anything. Each invoice item’s unit price is reported with the 13% VAT already included. Optionally, the same node can validate the document’s final status right after reception.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | siat credential |
| factura | json | No | Invoice as JSON: comprador (nit/documento, razonSocial, tipoDocumento), items (precioUnitario VAT-included, codigoProductoSin, actividadEconomica). If left empty, the node’s input data is used |
| cufd | text | No | Valid CUFD (if not in the credential nor inside factura) |
| codigo_control | text | No | CUFD control code |
| validar_estado | boolean | No | Validate the document’s status right after reception. Defaults to true |
Issuer data (NIT, company name, branch, point of sale) is automatically filled from the credential when not present in factura.
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", "numeroFactura": "128", "tipo": "1", "estado": "validated", "codigoRecepcion": "R-2026-000123", "qrUrl": "https://siat.impuestos.gob.bo/consulta?cuf=8A1B2C3D4E5F60718293A4B5C6D7E8F9", "total": 1130, "iva": 130, "mensajes": [], "xmlFirmado": "<Factura>...signed...</Factura>"}Usage Example
Section titled “Usage Example”Invoice for a service with one item (13% VAT included)
Section titled “Invoice for a service with one item (13% VAT included)”{ "credentials_id": "cred-siat-prod", "cufd": "ABCDEFGHIJK0123456789LMNOPQRSTUVWXYZ", "codigo_control": "A1B2", "factura": { "comprador": { "nit": "1234567011", "razonSocial": "Cliente SRL", "tipoDocumento": "NIT" }, "items": [ { "descripcion": "Consulting service", "cantidad": 1, "precioUnitario": 1130, "codigoProductoSin": "99100", "actividadEconomica": "620100" } ] }}factura.itemsis required and must have at least one item; if missing, the node stops before building the XML.- The CUFD and its control code are required: if not present in
factura, in the node’s configuration, or in the credential, the node returns an error (get them with SiatObtenerCufd). - If the credential’s certificate is expired, the node rejects issuance before signing.
- With
validar_estadoset to true (default) the document ends up asvalidatedorrejecteddepending on what the SIN confirms; with false it stays asreceived, unresolved. - Each item’s unit price is reported with the 13% VAT already included, not as a separate tax.
Related Nodes
Section titled “Related Nodes”- SiatObtenerCufd - Get the day’s CUFD before issuing
- SiatAnular - Cancel this invoice by its CUF
- SiatRepresentacion - Generate the printable representation with QR