agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/payments
Record money received — mark it paid or part-paid.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie agency.invoicing.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/payments \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
Defaults to the outstanding balance. The invoice's status is re-derived from the SUM of its payment rows, never incremented, so the two can never disagree. Requires `agency.invoicing.manage`.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
invoiceId (path) | Uuid | Ja | — |
org_id (query) | Uuid | Nee | Which of your organizations is invoicing. Required only when you belong to more than one — otherwise it is inferred from your DIRECT membership, never from the subtree-expanded… |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
amount_minor | integer | Nee | Defaults to the outstanding balance. |
method | string<card, wallet, crypto, bank_transfer, cash, cheque, other> | Nee | — |
note | string | Nee | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nee | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | Ja | — |
is_overdue | boolean | Nee | ⭐ DERIVED from the due date and the status, never stored — so there is no sweep to maintain a flag and nothing to go stale. A draft is never overdue however old it is: nobody ha… |
client_id | Uuid | Nee | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nee | — |
currency | string | Ja | — |
issue_date | string | Ja | — |
due_date | string | Nee | — |
reference | string | Nee | — |
notes | string | Nee | — |
footer | string | Nee | — |
subtotal_minor | integer | Nee | — |
discount_minor | integer | Nee | — |
tax_minor | integer | Nee | — |
total_minor | integer | Ja | — |
amount_paid_minor | integer | Nee | — |
amount_due_minor | integer | Nee | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nee | — |
source | string | Nee | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nee | — |
last_sent_to | string | Nee | — |
paid_at | string | Nee | — |
void_reason | string | Nee | — |
created_at | string | Nee | — |
lines | AgencyInvoiceLine[] | Nee | — |
payments | AgencyInvoicePayment[] | Nee | — |
portal_url | string | Nee | The payment link to send to the client. ⛔ Returned on a SINGLE-invoice read only, never in a list: a list is the thing that gets logged, cached and pasted into a support ticket,… |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 422 · 429