Skip to content

cucuContingencia

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)”.

FieldTypeRequiredDescription
credentials_idcredentialsYescucu credential
operationselectNoOperation — check_connection, start, end, active, list, resend, regularize
pos_idtextNoPoint of sale (UUID) — Empty = the credential default point of sale
branch_idtextNoBranch ID (UUID)
motivoselectNoEvent reason — 1, 2, 3, 4
descriptiontextNoDescription
event_idtextNoEvent ID (UUID)
event_datetextNoEvent date
end_datetextNoEnd date — ISO 8601, after the start. Empty = now
repetitionsnumberNoRepetitions (certification) — 1 to 10. Certification process only
output_keytextNoOutput key — The result is added to data[key] keeping the rest of the data

This module requires a credential of type cucu with the fields:

  • API key: starts with sk_test_ (sandbox) or sk_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
{
"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.

{
"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.