billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Todos os endpoints de billing

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

NomeTipoObrigatórioO que é
org_id (query)UuidNãoThe organization whose profile to replace; defaults to the caller's own.

Corpo da requisição

NomeTipoObrigatórioO que é
legal_namestringNão
company_namestringNão
billing_addressBillingAddressSimA 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_numberstringNão
tax_idLabelValueNão
custom_invoice_fieldsLabelValue[]Não
billing_emailstringNão
invoice_localestringNão

Resposta

NomeTipoObrigatórioO que é
org_idstringSim
legal_namestringSim
company_namestringSim
billing_addressBillingAddressSimA 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_numberstringSim
vat_statusstring<unvalidated, pending, valid, invalid>SimState 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_idLabelValueNãoA free-label secondary tax id (US EIN, AU ABN, …). Null when unset.
custom_invoice_fieldsLabelValue[]SimUp to five customer-defined `{label, value}` lines, rendered verbatim.
billing_emailstringSimWhere invoices are delivered; blank means the account email.
invoice_localestringSimPreferred invoice language; blank means the account language.
updated_atstringNãoWhen the profile was last saved. Null if it has never been saved.

Erros que este endpoint pode retornar

401 · 403 · 422 · 429