agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/void
Void an invoice.
Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. A kulcsnak rendelkeznie kell a(z) agency.invoicing.manage jogosultsággal; az ezzel nem rendelkező kulcsok esetén a rendszer 403-as hibát ad vissza 404 helyett.
A szervezet azonosítójának helye
Ez a végpont a(z) org_id paramétert lekérdezési paraméterként várja. Hagyja ki, ha a hívás az Ön teljes bérlői részfáját lefedje; küldje el a hívás egyetlen szervezetre történő szűkítéséhez.
A szervezeted azonosítója a vezérlőpult API-kulcsok képernyőjén található, közvetlenül a kulcs mellett. Ez ugyanaz az azonosító minden indított hívásban.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/void \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
⛔ 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`.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
invoiceId (path) | Uuid | Igen | — |
org_id (query) | Uuid | Nem | 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… |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
reason | string | Nem | — |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | Uuid | Igen | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nem | 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> | Igen | — |
is_overdue | boolean | Nem | ⭐ 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 | Nem | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nem | — |
currency | string | Igen | — |
issue_date | string | Igen | — |
due_date | string | Nem | — |
reference | string | Nem | — |
notes | string | Nem | — |
footer | string | Nem | — |
subtotal_minor | integer | Nem | — |
discount_minor | integer | Nem | — |
tax_minor | integer | Nem | — |
total_minor | integer | Igen | — |
amount_paid_minor | integer | Nem | — |
amount_due_minor | integer | Nem | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nem | — |
source | string | Nem | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nem | — |
last_sent_to | string | Nem | — |
paid_at | string | Nem | — |
void_reason | string | Nem | — |
created_at | string | Nem | — |
lines | AgencyInvoiceLine[] | Nem | — |
payments | AgencyInvoicePayment[] | Nem | — |
portal_url | string | Nem | 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,… |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 409 · 429