Kiipu · invoicing v1 current
kiipu. draft_ voided
Voids a DRAFT invoice (one created with kiipu.invoice_proposed and not yet issued), by its id or by the client's name when it is their only draft. Does not void issued invoices: that is for a person in Kiipu.
Last updated
POST /api/v1/actions/kiipu.draft_voided- Key scope
kiipu.draft_voided@1- Workspace permission
api.kiipu.draft_voidedoff by default
Two permissions, not one
Both are needed: a key with that scope, and the workspace owner having switched the permission on. Holding the key is not enough — they are two decisions made by different people.
Request
| field | type | rules | |
|---|---|---|---|
invoiceId | string (uuid) | optional | |
client | string | optional | min 1 · max 200 |
Response — output when status is done
| field | type | rules | |
|---|---|---|---|
invoiceId | string | required | |
clientId | string | required | |
clientName | string | required | |
totalUsd | string | required | |
status | "void" | required |
Example
# One request, one idempotency key: retrying with the same key never runs twice.
curl -X POST https://niiko.org/api/v1/actions/kiipu.draft_voided \
-H "Authorization: Bearer nk_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'
# 200 → done · 202 → pending_approval (a person signs later) · 4xx → refused, with a named reasonWhy it may refuse
Each reason names who can fix it and how. With reason stale, detail.message says what to do.
cliente_no_encontradocliente_ambiguodemasiados_clientesborrador_no_encontradovarios_borradoresno_es_borradorsin_permiso
In the clients
| @vorluno/niiko-sdk | niiko.voidedDraft() |
| niiko (Python) | niiko.voided_draft() |
| niiko-cli | niiko run kiipu.draft_voided |
| n8n-nodes-niiko | kiipuDraftVoided |
| niiko-mcp-server | kiipu_draft_voided |