billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Барлық billing соңғы нүктелері

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

API кілтін bearer токені ретінде жіберіңіз. Кілтте billing.invoice.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Ұйымыңыздың идентификаторы орналасатын жер

Бұл соңғы нүкте сұрау параметрі ретінде 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.

Параметрлер

АтыTүріМіндеттіМазмұны
org_id (query)UuidЖоқThe organization whose profile to replace; defaults to the caller's own.

Сұрау денесі

АтыTүріМіндеттіМазмұны
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Жоқ

Жауап

АтыTүріМіндеттіМазмұны
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