agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د agency.invoicing.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د پوښتنې پیرامیتر په توګه org_id اخلي. دا پریږدئ او زنګ ستاسو د استوګنې ټولې څانګې پوښي؛ د یوې سازمان لپاره د زنګ محدودولو لپاره یې واستوئ.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
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 په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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… |
د غوښتنې بدن
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
to | string | نه | Where to send it. Defaults to the client's stored email. |
locale | string | نه | 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 | نه | A covering line to put above the amount. |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
id | Uuid | هو | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | نه | 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> | هو | — |
is_overdue | boolean | نه | ⭐ 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 | نه | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | نه | — |
currency | string | هو | — |
issue_date | string | هو | — |
due_date | string | نه | — |
reference | string | نه | — |
notes | string | نه | — |
footer | string | نه | — |
subtotal_minor | integer | نه | — |
discount_minor | integer | نه | — |
tax_minor | integer | نه | — |
total_minor | integer | هو | — |
amount_paid_minor | integer | نه | — |
amount_due_minor | integer | نه | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | نه | — |
source | string | نه | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | نه | — |
last_sent_to | string | نه | — |
paid_at | string | نه | — |
void_reason | string | نه | — |
created_at | string | نه | — |
lines | AgencyInvoiceLine[] | نه | — |
payments | AgencyInvoicePayment[] | نه | — |
portal_url | string | نه | 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 | نه | — |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 404 · 409 · 422 · 429 · 503