agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran agency.invoicing.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
invoiceId (path) | Uuid | Ya | — |
org_id (query) | Uuid | Tidak | 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… |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
to | string | Tidak | Where to send it. Defaults to the client's stored email. |
locale | string | Tidak | 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 | Tidak | A covering line to put above the amount. |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Tidak | 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> | Ya | — |
is_overdue | boolean | Tidak | ⭐ 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 | Tidak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Tidak | — |
currency | string | Ya | — |
issue_date | string | Ya | — |
due_date | string | Tidak | — |
reference | string | Tidak | — |
notes | string | Tidak | — |
footer | string | Tidak | — |
subtotal_minor | integer | Tidak | — |
discount_minor | integer | Tidak | — |
tax_minor | integer | Tidak | — |
total_minor | integer | Ya | — |
amount_paid_minor | integer | Tidak | — |
amount_due_minor | integer | Tidak | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Tidak | — |
source | string | Tidak | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Tidak | — |
last_sent_to | string | Tidak | — |
paid_at | string | Tidak | — |
void_reason | string | Tidak | — |
created_at | string | Tidak | — |
lines | AgencyInvoiceLine[] | Tidak | — |
payments | AgencyInvoicePayment[] | Tidak | — |
portal_url | string | Tidak | 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 | Tidak | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 409 · 422 · 429 · 503