agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
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
| 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… |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
to | string | Nie | Where to send it. Defaults to the client's stored email. |
locale | string | Nie | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | Nie | A covering line to put above the amount. |
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,… |
sent_to | string | Nie | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 409 · 422 · 429 · 503