agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

כל נקודות הקצה מסוג agency-invoicing

אימות

שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה agency.invoicing.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.

המקום שבו מזהה הארגון שלך נכנס

נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.

מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

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

מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API

פרטים

Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.

פרמטרים

שםסוגנדרשמה זה
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…

גוף הבקשה

שםסוגנדרשמה זה
client_idUuidלאUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteלא
currencystringלא
issue_datestringלא
due_datestringלא
referencestringלא
notesstringלא
footerstringלא
linesAgencyInvoiceLineWrite[]לא

תשובה

שםסוגנדרשמה זה
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,…

שגיאות שנקודה קצה זו עשויה להחזיר

401 · 403 · 404 · 422 · 429