billing
PUT /v1/billing/profile
Replace the organization's billing profile.
Аутентификација
Пошаљите 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_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. |
Грешке које ова крајња тачка може вратити
401 · 403 · 422 · 429