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 эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Таны байгууллагын дугаар орох газар

Энэ төгсгөл цэг нь 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