Skip to content

SiatRepresentacion

Generates the printable representation of an invoice issued in the SIN’s SIAT in Bolivia, including its lookup QR code. The node fetches the already-issued invoice data (previously saved when using SiatEmitirFactura) by its CUF, builds the QR code, and returns an HTML document ready to print or convert to PDF.

The HTML includes the mandatory legend required by the SIN on printed representations of electronic invoices.

FieldTypeRequiredDescription
credentials_idcredentialsYessiat credential
cuftextYesCUF of the invoice

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",
"html": "<html>...representation with QR...</html>",
"qrUrl": "https://siat.impuestos.gob.bo/consulta?cuf=8A1B2C3D4E5F60718293A4B5C6D7E8F9",
"qrImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
{
"credentials_id": "cred-siat-prod",
"cuf": "8A1B2C3D4E5F60718293A4B5C6D7E8F9"
}
  • The invoice must already exist in the database (issued via SiatEmitirFactura); if it can’t be found by the CUF, the node returns an error.
  • The QR is delivered both as a data URL image (qrImage) and as the SIN’s public lookup URL (qrUrl).
  • The resulting HTML includes the SIN’s mandatory legend and is meant to be printed or converted to PDF.