agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/issue
Give the invoice its number and freeze it.
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}/issue \
-H "Authorization: Bearer zdk_live_…"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
Allocates the next number in YOUR series, freezes both parties onto the document and makes the payment link live. ⛔ An invoice with no lines, or one totalling zero, is refused — a numbered document for nothing is a gap in a sequence a tax authority expects to be unbroken. 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… |
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