Skip to content

cucuNotaCreditoDebito

Issues a credit or debit note on a VALIDATED invoice (sectors 24 standard, 47 discount, 48 ICE). You send only the returned or adjusted lines: CUCU clones the originals. Export (3) and foreign currency (9) invoices do not accept notes.

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: “Nota de crédito/débito”.

FieldTypeRequiredDescription
credentials_idcredentialsYescucu credential
invoice_idtextNoInvoice ID (UUID) — The id CUCU returns on issue. If empty, set the CUF
cuftextNoCUF — Unique Invoice Code. Used when no ID is given
point_of_sale_idtextNoPoint of sale (UUID) — Shown in CUCU Branches and points of sale. Empty = the credential default point of sale
nota_typeselectYesNote type — CREDITO, DEBITO
document_sectorselectNoNote sector — 24, 47, 48
returned_detailsjsonYesReturned lines (JSON) — Same keys as invoice lines. In sectors 47 and 48 each line carries nroItem (the original line lineNumber, from “Query → get”)
original_detailsjsonNoOriginal lines with ICE (JSON, sector 48) — [{“nroItem”:1,“marcaIce”:2,“montoIceEspecifico”:0,“montoIcePorcentual”:0}]
payment_method_codenumberNoPayment method (SIAT code)
card_numbertextNoCard number
observationstextNoObservations
is_ticketbooleanNoAlso generate an 80 mm ticket
default_activity_economictextNoDefault economic activity (CAEB) — Applied to lines without activityEconomic
default_code_product_sintextNoDefault SIN product code — Applied to lines without codeProductSin
default_unit_measurenumberNoDefault unit of measure — 58 = Service, 1 = Unit, 57 = Piece (unit-measures catalog)
precheckbooleanNoCheck first that the invoice is VALIDATED — One extra query that avoids a SIAT rejection
idempotency_modeselectNoDuplicate protection — With a key, a retry after a failure does not duplicate the invoice: CUCU returns the one already issued. For two identical invoices in a loop use a manual key (e.g. the order id) · auto, manual, off
idempotency_keytextNoIdempotency key — 1–255 visible characters, no spaces. Recommended: the sale id
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
{
"success": true,
"original_invoice_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"note": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"invoiceNumber": 10,
"cuf": "NOTACUF…",
"state": "VALIDATED"
},
"urls": {
"pdf": "https://api.cucu.bo/api/v1/public/invoice/2872F…/pdf",
"xml": "https://api.cucu.bo/api/v1/public/invoice/2872F…/xml",
"verify": "https://api.cucu.bo/f/2872F…"
},
"warnings": []
}

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",
"cuf": "2872F7294502332E637FABFBC3654EA82202AD48E0969F14EBEB8AF74",
"nota_type": "CREDITO",
"returned_details": [
{
"description": "Devolución parcial",
"quantity": 1,
"priceUnit": 200
}
],
"idempotency_key": "nc-pedido-77"
}
  • Only the returned lines (returnedDetails) are sent; CUCU infers the original ones. Sectors 47 and 48 require nroItem, and 48 also originalDetails (ICE mark 1 or 2).
  • Before issuing, the original invoice is checked to be VALIDATED (can be turned off with “Pre-check”).
  • Some sectors do not accept notes (CREDIT_DEBIT_NOTE_NOT_ALLOWED); in that case the invoice must be cancelled.