billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Все эндпоинты billing

Аутентификация

Отправьте ключ 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_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