billing
PUT /v1/billing/profile
Replace the organization's billing profile.
Аутентификация
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_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 | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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