billing

GET /v1/invoices

List the organization's billing documents.

כל נקודות הקצה מסוג billing

כל תיעוד המפתחים

אימות

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

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

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

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

נסה זאת

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

curl -X GET https://api.zinndigital.com/v1/invoices \
  -H "Authorization: Bearer zdk_live_…"

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

פרטים

The organization's billing history — every invoice and credit note issued to it, newest first, with its lines, its payment summaries and the captured amounts. Cursor-paginated, filterable by status; RLS-scoped; requires billing.view. These are the real legal documents (docs/34 §1). Each is an immutable snapshot with a gapless, per-entity ZD-INV-YYYY-NNNNNN number, a captured tax treatment and its own frozen FX rates. document_type separates an invoice from a credit note; credits_invoice_id says which invoice a credit note un-bills. ⚠️ The document is issued by a sweep, a couple of minutes after payment, not synchronously at checkout (docs/34 §4.1). Render a pending state for a just-placed order rather than assuming the document is there the moment checkout returns. pdf_url stays null until PDF rendering lands (#708).

פרמטרים

שםסוגנדרשמה זה
X-Zinn-Org (header)stringלאWhich organisation this call acts for. Send a client organisation's id and every org-scoped endpoint answers for that client alone; omit it and the answer covers everything…
cursor (query)stringלאOpaque cursor from a previous page's page.next_cursor.
limit (query)integerלאMaximum items to return (page size).
status (query)InvoiceStatusלאFilter by billing-document status.
org_id (query)UuidלאRestrict to one organization in scope.

תשובה

שםסוגנדרשמה זה
dataInvoice[]כן
pagePageMetaכן

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

401 · 403 · 422 · 429