reseller

PUT /v1/reseller/legal-entity

Save the company details your clients' invoices are issued under.

Todos os endpoints de reseller

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão reseller.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/reseller/legal-entity \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "country": <string>, "number_prefix": <string> }'

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

Creates the entity the first time and updates it afterwards — never a second row. `number_prefix` is **globally unique across every company on the platform** because it is what keeps two issuers' invoice numbers apart, so a value already in use is a 409; and it **freezes once an invoice has been issued** under this company, because releasing it would let the next taker mint numbers you have already issued. Everything else stays editable — a company that moves office must be able to say so. Requires `reseller.manage`.

Parâmetros

NomeTipoObrigatórioO que é
org_id (query)UuidNãoWhich of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r…

Corpo da requisição

NomeTipoObrigatórioO que é
idUuidNãoUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringSim
company_numberstringNão
address_line1stringNão
address_line2stringNão
citystringNão
regionstringNão
postcodestringNão
countrystringSimISO 3166-1 alpha-2. Stored uppercase.
vat_numberstringNão
footer_textstringNão
number_prefixstringSimThe prefix in every invoice number you issue (`AG-INV-2026-000123`). Globally unique across all companies on the platform, and frozen once you have issued an invoice.
number_prefix_lockedbooleanNãoTrue once an invoice has been issued under this company.
created_atstringNão
updated_atstringNão

Resposta

NomeTipoObrigatórioO que é
dataResellerLegalEntity | nullSim`null` when no company details are held yet.

Erros que este endpoint pode retornar

401 · 403 · 404 · 409 · 422 · 429