cucuDocumento
Description
Section titled “Description”Downloads the PDF (A4), signed XML, 80 mm ticket, SIAT ticket, mini ticket or ZIP of an invoice (public links: 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 SIAT: CUCU is an authorised provider handling signing, CUIS/CUFD codes and submission to the SIN. Node: “Descargar o enviar documento”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| operation | select | No | Operation — download, email |
| invoice_id | text | No | Invoice ID (UUID) — The id CUCU returns on issue. If empty, set the CUF |
| cuf | text | No | CUF — Unique Invoice Code. Used when no ID is given |
| format | select | No | Format — pdf, xml, ticket, ticketsiat, chititicket, zip, info |
| text | No | Destination email — Resend only. Empty = the client original email | |
| include_content | boolean | No | Return content (base64) — Turn off if you only need the URL |
| max_mb | number | No | Max size (MB) |
| output_key | text | No | Output key — The result is added to data[key] keeping the rest of the data |
Credentials
Section titled “Credentials”This module requires a credential of type cucu with the fields:
- API key: starts with
sk_test_(sandbox) orsk_live_(production); the environment is inferred from the prefix - Environment: automatic, testing or production (if it contradicts the key, nothing is sent)
- Default point of sale (UUID): used when the node does not specify one
- Company ID (UUID): for branches and certificate status
- Webhook secret (
whsec_…): to verify event signatures
Output
Section titled “Output”{ "operation": "download", "format": "pdf", "filename": "factura_2872F7294502.pdf", "content_type": "application/pdf", "size": 48213, "content_base64": "JVBERi0xLjQ…", "url": "https://api.cucu.bo/api/v1/public/invoice/2872F…/pdf"}The output is stored under the configured key (output_key, default cucu) and the rest of data is kept. On error: error.message, error.type and, where applicable, status, code and siat_code.
Usage Example
Section titled “Usage Example”{ "credentials_id": "cred-cucu", "operation": "download", "cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74", "format": "pdf"}- Formats:
pdf,ticket,ticketsiat,chititicket,xmlandzip. Downloads are public: the CUF acts as credential and the API key is NOT sent. - Content is returned as base64 (can be turned off to get just the URL). There is a configurable size cap.
- It can also resend the invoice by email (to another recipient if given).
Related Nodes
Section titled “Related Nodes”- cucuEmitirFactura - Emitir factura
- cucuConsultar - Consultar facturas