niiko/developers

Kiipu · invoicing v1 read-only

kiipu.client_invoices_list

Lists the latest invoices and payments of ONE client named by name: number, status, total, balance, and when and how they paid. With several matches it refuses with ambiguous and the candidates; with none, not_found.

Last updated

POST /api/v1/reads/kiipu.client_invoices_list
Token scope
kiipu.client_invoices_list@1
Workspace permission
api.kiipu.client_invoices_list off by default
Who reads
The person behind the token, with their role. Someone who leaves the workspace stops reading.
Three permissions

A token with that scope, the workspace owner having switched the read on, and the person's role seeing it in the product. None of them is enough alone. OAuth only →

Request

fieldtyperules
clientstringrequiredmin 1 · max 200

Response — output when status is done

fieldtyperules
clientstringrequired
owedTotalstringrequired^-?\d+\.\d{2}$
invoicesobject[]required
paymentsobject[]required

invoices[]

fieldtyperules
numberstring | nullrequired
statusstringrequired
totalstringrequired^-?\d+\.\d{2}$
balancestringrequired^-?\d+\.\d{2}$
currencystringrequired
createdOnstringrequired^\d{4}-\d{2}-\d{2}$
dueOnstring | nullrequired
daysOverdueinteger | nullrequired

payments[]

fieldtyperules
invoicestring | nullrequired
paidOnstringrequired^\d{4}-\d{2}-\d{2}$
amountstringrequired^-?\d+\.\d{2}$
methodstringrequired
reversedbooleanrequired

Example

# Reads take an OAuth access token, not an API key, and no idempotency key: reading changes nothing.
curl -X POST https://niiko.org/api/v1/reads/kiipu.client_invoices_list \
  -H "Authorization: Bearer $NIIKO_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "client": "…"
  }'
# 200 → done · 4xx → refused, with a named reason

Why it may refuse

Each reason names who can fix it and how; detail.message, when present, says what to do. Refusals & HTTP codes →

invalid_inputrole_forbiddengrant_offreads_need_a_personambiguousnot_found

In the clients

@vorluno/niiko-sdkniiko.listClientInvoices()
niiko (Python)niiko.list_client_invoices() from 0.3.0 · not on the registry yet
niiko-cliniiko read kiipu.client_invoices_list
n8n-nodes-niikoNo reads: the node holds a key, and reading needs a person through OAuth.
niiko-mcp-serverkiipu_client_invoices_list readOnlyHint

History