agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/send

Email the invoice to your client, with the PDF attached.

Բոլոր agency-invoicing վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա agency.invoicing.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն

Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:

Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում

Մանրամասներ

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`.

Պարամետրեր

ԱնունՏեսակՊահանջվում էԻնչ է դա
invoiceId (path)UuidԱյո
org_id (query)UuidՈչ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…

Հարցման մարմին

ԱնունՏեսակՊահանջվում էԻնչ է դա
tostringՈչWhere to send it. Defaults to the client's stored email.
localestringՈչWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringՈչA covering line to put above the amount.

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
idUuidԱյոUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringՈչThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Այո
is_overduebooleanՈչ⭐ 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_idUuidՈչUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringՈչ
currencystringԱյո
issue_datestringԱյո
due_datestringՈչ
referencestringՈչ
notesstringՈչ
footerstringՈչ
subtotal_minorintegerՈչ
discount_minorintegerՈչ
tax_minorintegerՈչ
total_minorintegerԱյո
amount_paid_minorintegerՈչ
amount_due_minorintegerՈչ
tax_breakdownAgencyInvoiceTaxGroup[]Ոչ
sourcestringՈչWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringՈչ
last_sent_tostringՈչ
paid_atstringՈչ
void_reasonstringՈչ
created_atstringՈչ
linesAgencyInvoiceLine[]Ոչ
paymentsAgencyInvoicePayment[]Ոչ
portal_urlstringՈչ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_tostringՈչ

Այս վերջնակետի կողմից վերադարձվող սխալները

401 · 403 · 404 · 409 · 422 · 429 · 503