agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
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
| 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 |
|---|---|---|---|
to | string | Nein | Where to send it. Defaults to the client's stored email. |
locale | string | Nein | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | Nein | A covering line to put above the amount. |
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,… |
sent_to | string | Nein | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 409 · 422 · 429 · 503