agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/void
Void an 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 POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/void \
-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
⛔ The number is KEPT — a voided invoice is a document that says VOID on it, not an absence, and deleting the number would leave the gap the sequence exists to prevent. ⛔ Refused when payments have been recorded: that is a refund, which is a different act. 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 |
|---|---|---|---|
reason | string | 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 · 429