Skip to content

Invoicing in Bolivia with factura.bo

This guide covers the facturaBo* nodes (the factura.bo provider by SimplifyIT S.R.L.): from the credential to issuing, correcting, cancelling and reconciling. Each field is described on the node’s page and the country summary is on the Bolivia page.

  1. In app.factura.bo → More → API Key generate your key.
  2. In Floogos create a Bolivia factura.bo credential with the key, the environment (sandbox or production), your NIT and the SIAT system code. Optional: default branch and point of sale (0 = head office / main point) and the webhook secret (whsec_…).
  3. Click Test credential.

Flow: Trigger → facturaBoEmitirFactura → facturaBoDocumento.

FieldExample value
document_sector1 (purchase and sale)
client_document_number{{customer_nit}}
client_business_name{{business_name}}
client_email{{email}} (factura.bo sends the PDF to the customer)
items[{"codigo_producto":"SERV-1","codigo_sin":83141,"descripcion":"Development service","cantidad":1,"precio_unitario":500,"unidad_medida":58}]
idempotency_modeauto
output_keyfacturabo

Result in data.facturabo: invoice.cuf, invoice.invoice_number, invoice.state (EMITIDA) and the links url_public, url_pdf, url_xml and url_ticket. To resend the PDF later, use facturaBoDocumento with operation: email and cuf: {{data.facturabo.invoice.cuf}}.

Lines accept factura.bo’s names (descripcion, cantidad, precio_unitario…) and their English equivalents. Anything missing is filled from the node defaults (default_codigo_sin, default_unit_measure, default_activity).

factura.bo has one endpoint for each of its 12 sectors, and the node validates each sector’s own data before calling the API. They go in sector_fields, except the buyer’s data:

SectorOwn data
1 Purchase and sale—
2 Property rentalperiodo_facturado
6 Tourism and lodging, 16 Hotelfecha_ingreso, cantidad_huespedes, cantidad_habitaciones
13 Utilitiesmes, gestion, numero_medidor, domicilio_cliente, consumo_periodo
3, 4, 28 Exportsbuyer’s client_country_code and client_address
8, 11, 14, 17Zero rate, education, ICE, hospital and clinic

The facturaBoEmitirFactura page lists the required fields of each sector.

  1. facturaBoTipoCambio with operation: current and output_key: tc.
  2. On the issue: currency_code: 2 and exchange_rate: {{data.tc.data.USD}}.

facturaBoValidarNit with nit: {{customer_nit}} checks the NIT. If it is not valid, route the flow to an error branch instead of issuing and getting a rejection.

Every issue carries X-Idempotency-Key (up to 128 characters; keys are remembered for 30 days):

  • auto: derived from the execution, the node and the content. A retry returns the invoice already issued.
  • manual: your own key, e.g. {{order_id}}; essential in loops with identical invoices.
  • off: no key; a timeout or a 5xx is not retried to avoid duplicates.

facturaBoNota:

  • operation: from_invoice with the invoice cuf and note_sector: 24. In returned_items give only what was returned, e.g. [{"nro_item_original":1,"cantidad":1}]. The effective amount of the note is 13 % of what was returned.
  • available lists the invoices a note can be issued against.
  • manual creates the note without starting from an invoice.
  • The idempotency key is required on this endpoint; in auto mode the node generates it for you.

facturaBoAnular with operation: cancel, the cuf and a motivo from the motivos_anulacion catalog (get it with facturaBoCatalogo). The revert operation is available to revert a cancellation.

With facturaBoContingencia, in four steps:

  1. start_event after the outage: the event end date cannot be in the future in Bolivian time, nor overlap another event.
  2. Issue with contingency enabled: the invoices stay OFFLINE.
  3. send_package (maximum 500 invoices).
  4. validate_package with the reception code. Only then do they become EMITIDA and consume credit.

Events 5, 6 and 7 require a CAFC, requested from the SIN; set it in the cafc field of the issue. list_events shows the registered events.

  1. Register the URL of a Webhook trigger with facturaBoWebhooks (create; the URL must be https and answer 2xx within 10 s). rotate_secret and test rotate the secret and test delivery.
  2. First node of the workflow: facturaBoVerificarWebhook. With no configuration it uses the credential’s secret and the received request.
  3. Continue only if the signature is valid.

The node translates the most common SIAT codes into a concrete hint:

CodeWhat to do
123CUFD expired (lasts 24 h): synchronise.
981Event with a future end date or overlapping: register it after the outage and without overlaps.
984The CUFD does not match the event window: synchronise and retry.
902CAFC missing (events 5, 6 and 7).
1040The issue date is outside the event range.
1047The invoice number exceeds the CAFC range: request a new one from the SIN.
954The package exceeds 500 invoices.
1002 / 1006The package CUF or CUFD does not match: do not mix events or CUFDs.
1049In a note, the line with codigo_detalle_transaccion=1 must replicate the original exactly.

facturaBoEmitirFactura · facturaBoEmitirLote · facturaBoNota · facturaBoAnular · facturaBoConsultar · facturaBoDocumento · facturaBoValidarNit · facturaBoCatalogo · facturaBoAdministrar · facturaBoContingencia · facturaBoWebhooks · facturaBoVerificarWebhook · facturaBoTipoCambio · facturaBoReportes