Skip to content

SiatEmitirFactura

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.

FieldTypeRequiredDescription
credentials_idcredentialsYessiat credential
facturajsonNoInvoice as JSON: comprador (nit/documento, razonSocial, tipoDocumento), items (precioUnitario VAT-included, codigoProductoSin, actividadEconomica). If left empty, the node’s input data is used
cufdtextNoValid CUFD (if not in the credential nor inside factura)
codigo_controltextNoCUFD control code
validar_estadobooleanNoValidate 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.

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

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.items is 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_estado set to true (default) the document ends up as validated or rejected depending on what the SIN confirms; with false it stays as received, unresolved.
  • Each item’s unit price is reported with the 13% VAT already included, not as a separate tax.