agency-invoicing

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

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

Alle agency-invoicing-eindpunten

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

NaamTypeVerplichtWat dit is
invoiceId (path)UuidJa
org_id (query)UuidNeeWhich 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

NaamTypeVerplichtWat dit is
tostringNeeWhere to send it. Defaults to the client's stored email.
localestringNeeWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringNeeA covering line to put above the amount.

Reactie

NaamTypeVerplichtWat dit is
idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNeeThe 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_overduebooleanNee⭐ 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_idUuidNeeUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNee
currencystringJa
issue_datestringJa
due_datestringNee
referencestringNee
notesstringNee
footerstringNee
subtotal_minorintegerNee
discount_minorintegerNee
tax_minorintegerNee
total_minorintegerJa
amount_paid_minorintegerNee
amount_due_minorintegerNee
tax_breakdownAgencyInvoiceTaxGroup[]Nee
sourcestringNeeWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNee
last_sent_tostringNee
paid_atstringNee
void_reasonstringNee
created_atstringNee
linesAgencyInvoiceLine[]Nee
paymentsAgencyInvoicePayment[]Nee
portal_urlstringNeeThe 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_tostringNee

Fouten die dit eindpunt kan retourneren

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