billing
PUT /v1/billing/profile
Replace the organization's billing profile.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה billing.invoice.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X PUT https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
A full replace (PUT) of the editable "Bill to" fields; an omitted field resets to blank. `billing_address` (with its required `country`, needed for tax) is the one mandatory member. Editing changes only invoices issued **afterwards** — a past invoice snapshotted the buyer block at issue time and is never rewritten (docs/34 §1.1). `vat_status` is engine-owned (the validate-not-trust flow, §2.3) and is not accepted here; changing `vat_number` resets it to `unvalidated`. Requires `billing.invoice.manage` in the target organization.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
org_id (query) | Uuid | לא | The organization whose profile to replace; defaults to the caller's own. |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
legal_name | string | לא | — |
company_name | string | לא | — |
billing_address | BillingAddress | כן | A billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server. |
vat_number | string | לא | — |
tax_id | LabelValue | לא | — |
custom_invoice_fields | LabelValue[] | לא | — |
billing_email | string | לא | — |
invoice_locale | string | לא | — |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
org_id | string | כן | — |
legal_name | string | כן | — |
company_name | string | כן | — |
billing_address | BillingAddress | כן | A billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server. |
vat_number | string | כן | — |
vat_status | string<unvalidated, pending, valid, invalid> | כן | State of the validate-not-trust check on `vat_number` (docs/34 §2.3). Read-only; a change to `vat_number` resets it to `unvalidated`. |
tax_id | LabelValue | לא | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | כן | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | כן | Where invoices are delivered; blank means the account email. |
invoice_locale | string | כן | Preferred invoice language; blank means the account language. |
updated_at | string | לא | When the profile was last saved. Null if it has never been saved. |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 422 · 429