cucuCufd
Description
Section titled “Description”Manages the CUFD (Daily Unique Billing Code) of a point of sale: see the active one, regenerate it or “ensure” a valid one exists (renews only if none or expiring soon). CUCU renews it on its own; use it at the start of the day or on the cufd.renewal_failed event.
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: “CUFD del punto de venta”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| operation | select | No | Operation — ensure, get, renew |
| pos_id | text | No | Point of sale (UUID) — Empty = the credential default point of sale |
| renew_before_minutes | number | No | Renew if expiring within (min) |
| 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": "ensure", "renewed": false, "cufd": "BQUFDZ…", "control_code": "C1D2E3", "expires_in_minutes": 612}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": "ensure", "renew_before_minutes": 60}- “Ensure” only requests a new CUFD if there is none, it is inactive or expires within the given minutes, so it can run often at no cost.
- A CUFD lasts one day in SIAT. CUCU usually renews it by itself; this node is useful for scheduled tasks or checks.
Related Nodes
Section titled “Related Nodes”- cucuContingencia - Contingencia (SIAT caído)
- cucuEmitirFactura - Emitir factura