agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu agency.invoicing.manage; ključ bez nje se odbija sa 403, a ne sa 404.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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`.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
invoiceId (path) | Uuid | Da | — |
org_id (query) | Uuid | Ne | 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… |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
to | string | Ne | Where to send it. Defaults to the client's stored email. |
locale | string | Ne | 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 | Ne | A covering line to put above the amount. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Ne | 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> | Da | — |
is_overdue | boolean | Ne | ⭐ 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 | Ne | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Ne | — |
currency | string | Da | — |
issue_date | string | Da | — |
due_date | string | Ne | — |
reference | string | Ne | — |
notes | string | Ne | — |
footer | string | Ne | — |
subtotal_minor | integer | Ne | — |
discount_minor | integer | Ne | — |
tax_minor | integer | Ne | — |
total_minor | integer | Da | — |
amount_paid_minor | integer | Ne | — |
amount_due_minor | integer | Ne | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Ne | — |
source | string | Ne | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Ne | — |
last_sent_to | string | Ne | — |
paid_at | string | Ne | — |
void_reason | string | Ne | — |
created_at | string | Ne | — |
lines | AgencyInvoiceLine[] | Ne | — |
payments | AgencyInvoicePayment[] | Ne | — |
portal_url | string | Ne | 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 | Ne | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 409 · 422 · 429 · 503