Аутентификация
Отправьте ключ 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