cucuNotaCreditoDebito
Description
Section titled “Description”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”.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | cucu credential |
| invoice_id | text | No | Invoice ID (UUID) — The id CUCU returns on issue. If empty, set the CUF |
| cuf | text | No | CUF — Unique Invoice Code. Used when no ID is given |
| point_of_sale_id | text | No | Point of sale (UUID) — Shown in CUCU Branches and points of sale. Empty = the credential default point of sale |
| nota_type | select | Yes | Note type — CREDITO, DEBITO |
| document_sector | select | No | Note sector — 24, 47, 48 |
| returned_details | json | Yes | Returned lines (JSON) — Same keys as invoice lines. In sectors 47 and 48 each line carries nroItem (the original line lineNumber, from “Query → get”) |
| original_details | json | No | Original lines with ICE (JSON, sector 48) — [{“nroItem”:1,“marcaIce”:2,“montoIceEspecifico”:0,“montoIcePorcentual”:0}] |
| payment_method_code | number | No | Payment method (SIAT code) |
| card_number | text | No | Card number |
| observations | text | No | Observations |
| is_ticket | boolean | No | Also generate an 80 mm ticket |
| default_activity_economic | text | No | Default economic activity (CAEB) — Applied to lines without activityEconomic |
| default_code_product_sin | text | No | Default SIN product code — Applied to lines without codeProductSin |
| default_unit_measure | number | No | Default unit of measure — 58 = Service, 1 = Unit, 57 = Piece (unit-measures catalog) |
| precheck | boolean | No | Check first that the invoice is VALIDATED — One extra query that avoids a SIAT rejection |
| idempotency_mode | select | No | Duplicate 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_key | text | No | Idempotency key — 1–255 visible characters, no spaces. Recommended: the sale id |
| 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”{ "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.
Usage Example
Section titled “Usage Example”{ "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 requirenroItem, and 48 alsooriginalDetails(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.
Related Nodes
Section titled “Related Nodes”- cucuEmitirFactura - Emitir factura
- cucuAnular - Anular o revertir factura
- cucuConsultar - Consultar facturas