agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/payments

Record money received — mark it paid or part-paid.

Alle agency-invoicing Endpunkte

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

NameTypErforderlichWas es ist
invoiceId (path)UuidJa
org_id (query)UuidNeinWhich 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

NameTypErforderlichWas es ist
amount_minorintegerNeinDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>Nein
notestringNein

Antwort

NameTypErforderlichWas es ist
idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNeinThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Ja
is_overduebooleanNein⭐ 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_idUuidNeinUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNein
currencystringJa
issue_datestringJa
due_datestringNein
referencestringNein
notesstringNein
footerstringNein
subtotal_minorintegerNein
discount_minorintegerNein
tax_minorintegerNein
total_minorintegerJa
amount_paid_minorintegerNein
amount_due_minorintegerNein
tax_breakdownAgencyInvoiceTaxGroup[]Nein
sourcestringNeinWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNein
last_sent_tostringNein
paid_atstringNein
void_reasonstringNein
created_atstringNein
linesAgencyInvoiceLine[]Nein
paymentsAgencyInvoicePayment[]Nein
portal_urlstringNeinThe 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