Skip to content

facturaBoDocumento

Downloads the PDF (A4), 80 mm ticket or fiscal XML of an invoice (public links that never expire: the CUF acts as the credential), or resends the invoice by email to the client or another address. The download is returned as base64.

Part of the Bolivia Fiscal Hub as an alternative to connecting directly to the SIAT: factura.bo (SimplifyIT S.R.L.) is a provider that builds and signs the XML and sends it to the SIN. Node: «Descargar o enviar documento».

FieldTypeRequiredDescription
credentials_idcredentialsYesfacturabo credential
operationselectNoOperation — download, email
cuftextYesCUF — Unique Invoice Code (returned on issue)
formatselectNoFormat — pdf, ticket, xml, info
emailtextNoDestination email — Resend only. Empty = the client original email. No emails are sent in sandbox
include_contentbooleanNoReturn content (base64)
max_mbnumberNoMax size (MB)
output_keytextNoOutput key — The result is added to data[key] keeping the rest of the data

This module requires a credential of type facturabo with the fields:

  • API key: get it at app.factura.bo → More → API Key
  • Environment: testing (sandbox, pilot SIAT) or production; the key does not reveal it, you choose
  • NIT and SIAT system code: to sync CUIS/CUFD and catalogs
  • Default branch and point of sale: 0 = head office / main point
  • Webhook secret (whsec_…): to verify event signatures
{
"success": true,
"operation": "download",
"cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74",
"format": "pdf",
"filename": "factura_2872F7294502.pdf",
"content_type": "application/pdf",
"size": 48213,
"content_base64": "JVBERi0xLjQ…",
"url": "https://api.factura.bo/f/2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74/pdf",
"environment": "production"
}

The output is stored under the configured key (output_key, default facturabo) and the rest of data is kept. On error: error.message, error.type and, where applicable, status and siat_code.

{
"credentials_id": "cred-facturabo",
"operation": "download",
"cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74",
"format": "pdf"
}
  • Formats: pdf (A4), ticket (80 mm) and fiscal xml. The /f/{cuf}/… links are public and never expire: the CUF acts as the credential and the API key is NOT sent.
  • Content is returned as base64 (can be turned off to get just the URL), with a configurable size cap.
  • Resend by email uses the client email or the one you give. In sandbox no emails are ever sent (the API answers 403); in production it can be disabled per account.