PUT /v1/teams/{teamId}/billing/profile
Upsert do profile
- Access: Team admin
- Service:
https://api-billing.axuz.net
Accepted authentication
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.bearerSession— JWT de acesso da sessão em `Authorization: Bearer`.
Responde PUT /teams/{teamId}/billing/profile via upsert (INSERT ... ON CONFLICT UPDATE) em billing_profiles. Default country=BR. Efeito: um round-trip só no DB. Usado tanto por criação quanto por edição.
Q-017 — passou a gravar trade_name (nome fantasia). É o caminho de ESCRITA da coluna criada na migration 008: sem ele a coluna nasceria e ninguém a preencheria, que é o mesmo defeito do Q-017 vestido de outro jeito (campo que existe e nunca é alimentado). A tela que expõe o campo mora no axuz_admin — o contrato JSON é {"trade_name": "..."}.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
team_id | string<uuid> | no | |
legal_name | string | no | |
tax_id | string | no | |
billing_email | string | no | |
billing_phone | string | no | |
address_line1 | string | no | |
address_line2 | string | no | |
city | string | no | |
state | string | no | |
postal_code | string | no | |
country | string | no | |
created_at | string<date-time> | no | |
updated_at | string<date-time> | no |
{
"team_id": "00000000-0000-0000-0000-000000000000",
"legal_name": "string",
"tax_id": "string",
"billing_email": "string",
"billing_phone": "string",
"address_line1": "string",
"address_line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "BR",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}Responses
200
ok
| Name | Type | Required | Description |
|---|---|---|---|
ok | boolean | no |
400
input inválido
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
erro interno
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X PUT 'https://api-billing.axuz.net/v1/teams/TEAM_ID/billing/profile' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"team_id":"00000000-0000-0000-0000-000000000000","legal_name":"string","tax_id":"string","billing_email":"string","billing_phone":"string","address_line1":"string","address_line2":"string","city":"string","state":"string","postal_code":"string","country":"BR","created_at":"2026-01-15T12:00:00Z","updated_at":"2026-01-15T12:00:00Z"}'Node.js
const res = await fetch("https://api-billing.axuz.net/v1/teams/TEAM_ID/billing/profile", {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"team_id": "00000000-0000-0000-0000-000000000000",
"legal_name": "string",
"tax_id": "string",
"billing_email": "string",
"billing_phone": "string",
"address_line1": "string",
"address_line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "BR",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"PUT",
"https://api-billing.axuz.net/v1/teams/TEAM_ID/billing/profile",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"team_id": "00000000-0000-0000-0000-000000000000",
"legal_name": "string",
"tax_id": "string",
"billing_email": "string",
"billing_phone": "string",
"address_line1": "string",
"address_line2": "string",
"city": "string",
"state": "string",
"postal_code": "string",
"country": "BR",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z",
},
timeout=30,
)
res.raise_for_status()
print(res.json())