agency-invoicing

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

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

Tüm agency-invoicing uç noktaları

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

AdTürZorunluNe olduğu
invoiceId (path)UuidEvet
org_id (query)UuidHayırWhich 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

AdTürZorunluNe olduğu
tostringHayırWhere to send it. Defaults to the client's stored email.
localestringHayırWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringHayırA covering line to put above the amount.

Yanıt

AdTürZorunluNe olduğu
idUuidEvetUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringHayırThe 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>Evet
is_overduebooleanHayı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_idUuidHayırUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringHayır
currencystringEvet
issue_datestringEvet
due_datestringHayır
referencestringHayır
notesstringHayır
footerstringHayır
subtotal_minorintegerHayır
discount_minorintegerHayır
tax_minorintegerHayır
total_minorintegerEvet
amount_paid_minorintegerHayır
amount_due_minorintegerHayır
tax_breakdownAgencyInvoiceTaxGroup[]Hayır
sourcestringHayırWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringHayır
last_sent_tostringHayır
paid_atstringHayır
void_reasonstringHayır
created_atstringHayır
linesAgencyInvoiceLine[]Hayır
paymentsAgencyInvoicePayment[]Hayır
portal_urlstringHayırThe 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_tostringHayır

Bu uç noktanın dönderebileceği hatalar

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