billing
GET /v1/billing/profile
Get the organization's billing profile.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу billing.view; кључ без ње се одбија уз 403, а не 404.
Где се уноси ID ваше организације
Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X GET https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…"Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Returns the customer's one "Bill to" block — what renders on the next invoice (docs/34 §2.5). An organization that has never saved one gets a 200 with an empty profile (every field blank, updated_at null), not a 404, so the form always has a shape to render. Requires billing.view.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
org_id (query) | Uuid | Не | The organization whose profile to read; defaults to the caller's own. |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
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