agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/payments
Record money received — mark it paid or part-paid.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung agency.invoicing.manage verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Abfrageparameter. Lassen Sie ihn weg, erfasst der Aufruf Ihren gesamten Mandanten-Unterbaum; übergeben Sie ihn, um den Aufruf auf eine Organisation einzugrenzen.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem 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 '{ }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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`.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
invoiceId (path) | Uuid | Ja | — |
org_id (query) | Uuid | Nein | 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… |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
amount_minor | integer | Nein | Defaults to the outstanding balance. |
method | string<card, wallet, crypto, bank_transfer, cash, cheque, other> | Nein | — |
note | string | Nein | — |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nein | 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 | Nein | ⭐ 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 | Nein | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nein | — |
currency | string | Ja | — |
issue_date | string | Ja | — |
due_date | string | Nein | — |
reference | string | Nein | — |
notes | string | Nein | — |
footer | string | Nein | — |
subtotal_minor | integer | Nein | — |
discount_minor | integer | Nein | — |
tax_minor | integer | Nein | — |
total_minor | integer | Ja | — |
amount_paid_minor | integer | Nein | — |
amount_due_minor | integer | Nein | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nein | — |
source | string | Nein | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nein | — |
last_sent_to | string | Nein | — |
paid_at | string | Nein | — |
void_reason | string | Nein | — |
created_at | string | Nein | — |
lines | AgencyInvoiceLine[] | Nein | — |
payments | AgencyInvoicePayment[] | Nein | — |
portal_url | string | Nein | 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,… |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422 · 429