agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/void
Void an invoice.
Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin agency.invoicing.manage; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/void \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
⛔ 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`.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
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… |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
reason | string | Tidak | — |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
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,… |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 409 · 429