agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/void
Void an invoice.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea agency.invoicing.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Unde merge ID-ul organizației tale
Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/void \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
⛔ 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`.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
invoiceId (path) | Uuid | Da | — |
org_id (query) | Uuid | Nu | 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… |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
reason | string | Nu | — |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nu | 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> | Da | — |
is_overdue | boolean | Nu | ⭐ 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 | Nu | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nu | — |
currency | string | Da | — |
issue_date | string | Da | — |
due_date | string | Nu | — |
reference | string | Nu | — |
notes | string | Nu | — |
footer | string | Nu | — |
subtotal_minor | integer | Nu | — |
discount_minor | integer | Nu | — |
tax_minor | integer | Nu | — |
total_minor | integer | Da | — |
amount_paid_minor | integer | Nu | — |
amount_due_minor | integer | Nu | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nu | — |
source | string | Nu | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nu | — |
last_sent_to | string | Nu | — |
paid_at | string | Nu | — |
void_reason | string | Nu | — |
created_at | string | Nu | — |
lines | AgencyInvoiceLine[] | Nu | — |
payments | AgencyInvoicePayment[] | Nu | — |
portal_url | string | Nu | 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,… |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 409 · 429