Skip to content

cucuEmisionMasiva

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

FieldTypeRequiredDescription
credentials_idcredentialsYescucu credential
operationselectNoOperation — open, end, get, rectify
pos_idtextNoPoint of sale (UUID) — Empty = the credential default point of sale
repetitionsnumberNoRepetitions (certification) — 1 to 10, when closing
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": {
"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.

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