agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
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 PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-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
⛔ A `409` means the invoice has been issued and its figures are frozen. A sent invoice is a document your client is holding — void it and issue a replacement rather than restating it. 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 |
|---|---|---|---|
currency | string | Hayır | — |
issue_date | string | Hayır | — |
due_date | string | Hayır | — |
reference | string | Hayır | — |
notes | string | Hayır | — |
footer | string | Hayır | — |
lines | AgencyInvoiceLineWrite[] | Hayır | — |
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,… |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 409 · 422 · 429