billing

PUT /v1/billing/profile

Replace the organization's billing profile.

همه نقاط پایانی billing

احراز هویت

یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز 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_namestringخیر
company_namestringخیر
billing_addressBillingAddressبله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_numberstringخیر
tax_idLabelValueخیر
custom_invoice_fieldsLabelValue[]خیر
billing_emailstringخیر
invoice_localestringخیر

پاسخ

نامنوعالزامیچیست
org_idstringبله
legal_namestringبله
company_namestringبله
billing_addressBillingAddressبله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_numberstringبله
vat_statusstring<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_idLabelValueخیرA free-label secondary tax id (US EIN, AU ABN, …). Null when unset.
custom_invoice_fieldsLabelValue[]بلهUp to five customer-defined `{label, value}` lines, rendered verbatim.
billing_emailstringبلهWhere invoices are delivered; blank means the account email.
invoice_localestringبلهPreferred invoice language; blank means the account language.
updated_atstringخیرWhen the profile was last saved. Null if it has never been saved.

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 403 · 422 · 429