billing
PUT /v1/billing/profile
Replace the organization's billing profile.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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
التفاصيل
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