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; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את 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 בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-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… |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
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