agency-invoicing

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

Email the invoice to your client, with the PDF attached.

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}/send \
  -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

Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. 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…

Treść żądania

NazwaTypWymaganeCo to jest
tostringNieWhere to send it. Defaults to the client's stored email.
localestringNieWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringNieA covering line to put above the amount.

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,…
sent_tostringNie

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 409 · 422 · 429 · 503