GET /teams/{teamId}/billing/plans
Lista planos públicos+ativos
- Access: Team member
- 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 GET /teams/{teamId}/billing/plans devolvendo apenas os planos ativos+públicos (self-service). Efeito: SELECT em subscription_plans filtrado.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes |
Responses
200
planos
| Name | Type | Required | Description |
|---|---|---|---|
items | array<BillingPlan> | no | |
items[].id | string<uuid> | no | |
items[].slug | string | no | |
items[].name | string | no | |
items[].tier | string | no | |
items[].description | string | no | |
items[].price_monthly_cents | integer | no | |
items[].price_yearly_cents | integer | no | |
items[].currency | string | no | |
items[].trial_days | integer | no | |
items[].limits | object | no | |
items[].is_active | boolean | no | |
items[].is_public | boolean | no | |
items[].sort_order | integer | no | |
items[].created_at | string<date-time> | no | |
items[].updated_at | string<date-time> | no |
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 GET 'https://api-billing.axuz.net/teams/TEAM_ID/billing/plans' \
-H "Authorization: Bearer $AXUZ_TOKEN"Node.js
const res = await fetch("https://api-billing.axuz.net/teams/TEAM_ID/billing/plans", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
},
});
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(
"GET",
"https://api-billing.axuz.net/teams/TEAM_ID/billing/plans",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())