cucuEmisionMasiva
Description
Section titled “Description”SIAT massive emission: open a batch, issue invoices with “Issue invoice” (they join the batch until closed), close the batch (builds 500-invoice packages, sends and validates them; may take minutes), query it and rectify the rejected ones. Do not rectify packages pending validation: you would duplicate invoices the SIAT already has.
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: “Emisión masiva”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| operation | select | No | Operation — open, end, get, rectify |
| pos_id | text | No | Point of sale (UUID) — Empty = the credential default point of sale |
| repetitions | number | No | Repetitions (certification) — 1 to 10, when closing |
| 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": "end", "data": { "facturasEnLote": 1250, "packsEnviados": 3, "packsRechazados": 1 }, "warnings": [ "1 paquete(s) rechazado(s)" ]}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": "end", "repetitions": 3}- Opens and closes bulk-issuing mode for the point of sale. Closing sends the packages to SIAT and can take minutes (the node waits up to 10 min).
- If packages were rejected, “Rectify” resends them; do NOT rectify those still pending.
Related Nodes
Section titled “Related Nodes”- cucuEmitirLote - Emitir facturas en lote
- cucuContingencia - Contingencia (SIAT caído)