agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya agency.invoicing.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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`.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
invoiceId (path) | Uuid | Ndiyo | — |
org_id (query) | Uuid | Hapana | 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… |
Mwili wa ombi
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
to | string | Hapana | Where to send it. Defaults to the client's stored email. |
locale | string | Hapana | 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 | Hapana | A covering line to put above the amount. |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
id | Uuid | Ndiyo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Hapana | 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> | Ndiyo | — |
is_overdue | boolean | Hapana | ⭐ 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 | Hapana | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Hapana | — |
currency | string | Ndiyo | — |
issue_date | string | Ndiyo | — |
due_date | string | Hapana | — |
reference | string | Hapana | — |
notes | string | Hapana | — |
footer | string | Hapana | — |
subtotal_minor | integer | Hapana | — |
discount_minor | integer | Hapana | — |
tax_minor | integer | Hapana | — |
total_minor | integer | Ndiyo | — |
amount_paid_minor | integer | Hapana | — |
amount_due_minor | integer | Hapana | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Hapana | — |
source | string | Hapana | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Hapana | — |
last_sent_to | string | Hapana | — |
paid_at | string | Hapana | — |
void_reason | string | Hapana | — |
created_at | string | Hapana | — |
lines | AgencyInvoiceLine[] | Hapana | — |
payments | AgencyInvoicePayment[] | Hapana | — |
portal_url | string | Hapana | 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 | Hapana | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 404 · 409 · 422 · 429 · 503