agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/issue
Give the invoice its number and freeze it.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie agency.invoicing.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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`.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
invoiceId (path) | Uuid | Tak | — |
org_id (query) | Uuid | Nie | 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… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | Uuid | Tak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nie | 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> | Tak | — |
is_overdue | boolean | Nie | ⭐ 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 | Nie | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nie | — |
currency | string | Tak | — |
issue_date | string | Tak | — |
due_date | string | Nie | — |
reference | string | Nie | — |
notes | string | Nie | — |
footer | string | Nie | — |
subtotal_minor | integer | Nie | — |
discount_minor | integer | Nie | — |
tax_minor | integer | Nie | — |
total_minor | integer | Tak | — |
amount_paid_minor | integer | Nie | — |
amount_due_minor | integer | Nie | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nie | — |
source | string | Nie | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nie | — |
last_sent_to | string | Nie | — |
paid_at | string | Nie | — |
void_reason | string | Nie | — |
created_at | string | Nie | — |
lines | AgencyInvoiceLine[] | Nie | — |
payments | AgencyInvoicePayment[] | Nie | — |
portal_url | string | Nie | 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,… |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 409 · 429