billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Све billing крајње тачке

Сва документација за програмере →

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

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу billing.invoice.manage; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка прихвата 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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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