agency-invoicing

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

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

All agency-invoicing endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the agency.invoicing.manage permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your 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 '{  }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the 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

NameTypeRequiredWhat it is
invoiceId (path)UuidYes—
org_id (query)UuidNoWhich 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…

Request body

NameTypeRequiredWhat it is
tostringNoWhere to send it. Defaults to the client's stored email.
localestringNoWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringNoA covering line to put above the amount.

Response

NameTypeRequiredWhat it is
idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNoThe 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>Yes—
is_overduebooleanNo⭐ 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 has…
client_idUuidNoUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNo—
currencystringYes—
issue_datestringYes—
due_datestringNo—
referencestringNo—
notesstringNo—
footerstringNo—
subtotal_minorintegerNo—
discount_minorintegerNo—
tax_minorintegerNo—
total_minorintegerYes—
amount_paid_minorintegerNo—
amount_due_minorintegerNo—
tax_breakdownAgencyInvoiceTaxGroup[]No—
sourcestringNoWhere the invoice came from — time_tracking when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNo—
last_sent_tostringNo—
paid_atstringNo—
void_reasonstringNo—
created_atstringNo—
linesAgencyInvoiceLine[]No—
paymentsAgencyInvoicePayment[]No—
portal_urlstringNoThe 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_tostringNo—

Errors this endpoint can return

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