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, за да можете да видите действителния отговор. Отворете този край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_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.

Грешки, които този крайpoint може да върне

401 · 403 · 422 · 429