billing
PUT /v1/billing/profile
Replace the organization's billing profile.
Упълномощаване
Изпратете 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, за да можете да видите действителния отговор. Отворете този крайpoint в 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. |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429