cucuContingencia
Description
Section titled “Description”Manages contingency events when the SIAT is down: check the connection, open an event (internet outage, SIAT failure, virus, other), close it (sends the packages of invoices issued offline), see the active event, list a day events, resend a package and regularize invoices issued outside the window. Closing an event does not guarantee the SIAT accepted everything: check each package status.
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: “Contingencia (SIAT caído)”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| operation | select | No | Operation — check_connection, start, end, active, list, resend, regularize |
| pos_id | text | No | Point of sale (UUID) — Empty = the credential default point of sale |
| branch_id | text | No | Branch ID (UUID) |
| motivo | select | No | Event reason — 1, 2, 3, 4 |
| description | text | No | Description |
| event_id | text | No | Event ID (UUID) |
| event_date | text | No | Event date |
| end_date | text | No | End date — ISO 8601, after the start. Empty = now |
| repetitions | number | No | Repetitions (certification) — 1 to 10. Certification process only |
| 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": { "id": "880e8400-e29b-41d4-a716-446655440020", "finalizado": true }, "warnings": [ "2 paquete(s) no validado(s): REJECTED, SENT" ]}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": "start", "branch_id": "770e8400-e29b-41d4-a716-446655440010", "motivo": "2", "description": "Falla del SIAT"}- Manages significant events: check SIAT connectivity, start and end an event, regularise, list and show the active one.
- When ending or regularising, any unvalidated packages are reported in
warnings.
Related Nodes
Section titled “Related Nodes”- cucuEmisionMasiva - Emisión masiva
- cucuCufd - CUFD del punto de venta