agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar agency.invoicing.manage iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Kurum kimliğinizin yazılacağı yer
Bu uç nokta, org_id parametresini bir sorgu parametresi olarak alır. Bu parametreyi dışarıda bırakırsanız çağrı tüm kiracı alt ağacınızı kapsar; çağrıyı tek bir kuruluşa daraltmak için gönderin.
Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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`.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
invoiceId (path) | Uuid | Evet | — |
org_id (query) | Uuid | Hayır | 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… |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
to | string | Hayır | Where to send it. Defaults to the client's stored email. |
locale | string | Hayır | 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 | Hayır | A covering line to put above the amount. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Hayır | 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> | Evet | — |
is_overdue | boolean | Hayır | ⭐ 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 | Hayır | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Hayır | — |
currency | string | Evet | — |
issue_date | string | Evet | — |
due_date | string | Hayır | — |
reference | string | Hayır | — |
notes | string | Hayır | — |
footer | string | Hayır | — |
subtotal_minor | integer | Hayır | — |
discount_minor | integer | Hayır | — |
tax_minor | integer | Hayır | — |
total_minor | integer | Evet | — |
amount_paid_minor | integer | Hayır | — |
amount_due_minor | integer | Hayır | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Hayır | — |
source | string | Hayır | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Hayır | — |
last_sent_to | string | Hayır | — |
paid_at | string | Hayır | — |
void_reason | string | Hayır | — |
created_at | string | Hayır | — |
lines | AgencyInvoiceLine[] | Hayır | — |
payments | AgencyInvoicePayment[] | Hayır | — |
portal_url | string | Hayır | 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 | Hayır | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 409 · 422 · 429 · 503