agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
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}/send \
-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
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`.
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 |
|---|---|---|---|
to | string | Nee | Where to send it. Defaults to the client's stored email. |
locale | string | Nee | 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 | Nee | A covering line to put above the amount. |
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,… |
sent_to | string | Nee | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 409 · 422 · 429 · 503