agency-invoicing

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

Email the invoice to your client, with the PDF attached.

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}/send \
  -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

Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. 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
tostringNeinWhere to send it. Defaults to the client's stored email.
localestringNeinWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringNeinA covering line to put above the amount.

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,…
sent_tostringNein

Fehler, die dieser Endpunkt zurückgeben kann

401 · 403 · 404 · 409 · 422 · 429 · 503