agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/issue

Give the invoice its number and freeze it.

Wszystkie punkty końcowe agency-invoicing

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

NazwaTypWymaganeCo to jest
invoiceId (path)UuidTak
org_id (query)UuidNieWhich 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ź

NazwaTypWymaganeCo to jest
idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNieThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Tak
is_overduebooleanNie⭐ 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_idUuidNieUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNie
currencystringTak
issue_datestringTak
due_datestringNie
referencestringNie
notesstringNie
footerstringNie
subtotal_minorintegerNie
discount_minorintegerNie
tax_minorintegerNie
total_minorintegerTak
amount_paid_minorintegerNie
amount_due_minorintegerNie
tax_breakdownAgencyInvoiceTaxGroup[]Nie
sourcestringNieWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNie
last_sent_tostringNie
paid_atstringNie
void_reasonstringNie
created_atstringNie
linesAgencyInvoiceLine[]Nie
paymentsAgencyInvoicePayment[]Nie
portal_urlstringNieThe 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