agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea agency.invoicing.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Unde merge ID-ul organizației tale
Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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`.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
invoiceId (path) | Uuid | Da | — |
org_id (query) | Uuid | Nu | 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… |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
to | string | Nu | Where to send it. Defaults to the client's stored email. |
locale | string | Nu | 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 | Nu | A covering line to put above the amount. |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nu | 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> | Da | — |
is_overdue | boolean | Nu | ⭐ 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 | Nu | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nu | — |
currency | string | Da | — |
issue_date | string | Da | — |
due_date | string | Nu | — |
reference | string | Nu | — |
notes | string | Nu | — |
footer | string | Nu | — |
subtotal_minor | integer | Nu | — |
discount_minor | integer | Nu | — |
tax_minor | integer | Nu | — |
total_minor | integer | Da | — |
amount_paid_minor | integer | Nu | — |
amount_due_minor | integer | Nu | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nu | — |
source | string | Nu | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nu | — |
last_sent_to | string | Nu | — |
paid_at | string | Nu | — |
void_reason | string | Nu | — |
created_at | string | Nu | — |
lines | AgencyInvoiceLine[] | Nu | — |
payments | AgencyInvoicePayment[] | Nu | — |
portal_url | string | Nu | 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 | Nu | — |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 409 · 422 · 429 · 503