agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. A kulcsnak rendelkeznie kell a(z) agency.invoicing.manage jogosultsággal; az ezzel nem rendelkező kulcsok esetén a rendszer 403-as hibát ad vissza 404 helyett.
A szervezet azonosítójának helye
Ez a végpont a(z) org_id paramétert lekérdezési paraméterként várja. Hagyja ki, ha a hívás az Ön teljes bérlői részfáját lefedje; küldje el a hívás egyetlen szervezetre történő szűkítéséhez.
A szervezeted azonosítója a vezérlőpult API-kulcsok képernyőjén található, közvetlenül a kulcs mellett. Ez ugyanaz az azonosító minden indított hívásban.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
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`.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
invoiceId (path) | Uuid | Igen | — |
org_id (query) | Uuid | Nem | 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… |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
to | string | Nem | Where to send it. Defaults to the client's stored email. |
locale | string | Nem | 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 | Nem | A covering line to put above the amount. |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | Uuid | Igen | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Nem | 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> | Igen | — |
is_overdue | boolean | Nem | ⭐ 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 | Nem | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Nem | — |
currency | string | Igen | — |
issue_date | string | Igen | — |
due_date | string | Nem | — |
reference | string | Nem | — |
notes | string | Nem | — |
footer | string | Nem | — |
subtotal_minor | integer | Nem | — |
discount_minor | integer | Nem | — |
tax_minor | integer | Nem | — |
total_minor | integer | Igen | — |
amount_paid_minor | integer | Nem | — |
amount_due_minor | integer | Nem | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Nem | — |
source | string | Nem | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Nem | — |
last_sent_to | string | Nem | — |
paid_at | string | Nem | — |
void_reason | string | Nem | — |
created_at | string | Nem | — |
lines | AgencyInvoiceLine[] | Nem | — |
payments | AgencyInvoicePayment[] | Nem | — |
portal_url | string | Nem | 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 | Nem | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 409 · 422 · 429 · 503