billing
PUT /v1/billing/profile
Replace the organization's billing profile.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.invoice.manage; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X PUT https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | Uuid | Não | The organization whose profile to replace; defaults to the caller's own. |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
legal_name | string | Não | — |
company_name | string | Não | — |
billing_address | BillingAddress | Sim | 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 | Não | — |
tax_id | LabelValue | Não | — |
custom_invoice_fields | LabelValue[] | Não | — |
billing_email | string | Não | — |
invoice_locale | string | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | string | Sim | — |
legal_name | string | Sim | — |
company_name | string | Sim | — |
billing_address | BillingAddress | Sim | 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 | Sim | — |
vat_status | string<unvalidated, pending, valid, invalid> | Sim | 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 | Não | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | Sim | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | Sim | Where invoices are delivered; blank means the account email. |
invoice_locale | string | Sim | Preferred invoice language; blank means the account language. |
updated_at | string | Não | When the profile was last saved. Null if it has never been saved. |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429