agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na agency.invoicing.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Kung saan mapupunta ang id ng iyong organisasyon
Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.
Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
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`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
invoiceId (path) | Uuid | Oo | — |
org_id (query) | Uuid | Hindi | 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… |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
to | string | Hindi | Where to send it. Defaults to the client's stored email. |
locale | string | Hindi | 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 | Hindi | A covering line to put above the amount. |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Hindi | 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> | Oo | — |
is_overdue | boolean | Hindi | ⭐ 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 | Hindi | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Hindi | — |
currency | string | Oo | — |
issue_date | string | Oo | — |
due_date | string | Hindi | — |
reference | string | Hindi | — |
notes | string | Hindi | — |
footer | string | Hindi | — |
subtotal_minor | integer | Hindi | — |
discount_minor | integer | Hindi | — |
tax_minor | integer | Hindi | — |
total_minor | integer | Oo | — |
amount_paid_minor | integer | Hindi | — |
amount_due_minor | integer | Hindi | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Hindi | — |
source | string | Hindi | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Hindi | — |
last_sent_to | string | Hindi | — |
paid_at | string | Hindi | — |
void_reason | string | Hindi | — |
created_at | string | Hindi | — |
lines | AgencyInvoiceLine[] | Hindi | — |
payments | AgencyInvoicePayment[] | Hindi | — |
portal_url | string | Hindi | 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 | Hindi | — |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 409 · 422 · 429 · 503