agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

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 \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

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

Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.

Parametry

NazwaTypWymaganeCo to jest
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…

Treść żądania

NazwaTypWymaganeCo to jest
client_idUuidNieUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteNie
currencystringNie
issue_datestringNie
due_datestringNie
referencestringNie
notesstringNie
footerstringNie
linesAgencyInvoiceLineWrite[]Nie

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 · 422 · 429