GET /v1/teams/{teamId}/billing/invoices
Últimas 100 faturas do time
- Acesso: Membro da equipe
- Serviço:
https://api-billing.axuz.net
Autenticação aceita
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/invoices pra Admin/Financer do workspace verem seu histórico. Devolve as 100 mais recentes. Efeito: SELECT em invoices por team_id ordenado por issued_at DESC.
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
teamId | path | string | sim |
Respostas
200
lista
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
items | array<BillingInvoice> | não | |
items[].id | string<uuid> | não | |
items[].team_id | string<uuid> | não | |
items[].subscription_id | string<uuid> | null | não | |
items[].number | string | não | |
items[].status | string | não | enum: |
items[].currency | string | não | |
items[].subtotal_cents | integer | não | |
items[].tax_cents | integer | não | |
items[].discount_cents | integer | não | |
items[].total_cents | integer | não | |
items[].issued_at | string<date-time> | não | |
items[].due_at | string<date-time> | não | |
items[].paid_at | string<date-time> | null | não | |
items[].period_start | string<date-time> | null | não | |
items[].period_end | string<date-time> | null | não | |
items[].pdf_url | string | não | |
items[].tax_id_snapshot | string | não | |
items[].billing_email | string | não | |
items[].provider | string | não | |
items[].provider_inv_id | string | não | |
items[].notes | string | não | |
items[].created_at | string<date-time> | não | |
items[].updated_at | string<date-time> | não | |
items[].items | array<BillingInvoiceItem> | não | |
items[].items[].id | string<uuid> | não | |
items[].items[].invoice_id | string<uuid> | não | |
items[].items[].description | string | não | |
items[].items[].quantity | integer | não | |
items[].items[].unit_cents | integer | não | |
items[].items[].amount_cents | integer | não | |
items[].items[].metadata | object | não | |
items[].payments | array<BillingPayment> | não | |
items[].payments[].id | string<uuid> | não | |
items[].payments[].invoice_id | string<uuid> | não | |
items[].payments[].team_id | string<uuid> | não | |
items[].payments[].amount_cents | integer | não | |
items[].payments[].currency | string | não | |
items[].payments[].status | string | não | enum: |
items[].payments[].method | string | não | |
items[].payments[].provider | string | não | |
items[].payments[].provider_pay_id | string | não | |
items[].payments[].failure_reason | string | não | |
items[].payments[].paid_at | string<date-time> | null | não | |
items[].payments[].created_at | string<date-time> | não |
400
input inválido
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
401
Sem credencial valida
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
429
Limite de requisições excedido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
500
erro interno
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
Exemplos
O "Try it" está desligado nesta referência. Use os exemplos com a sua credencial de teste.
curl
curl -sS -X GET 'https://api-billing.axuz.net/v1/teams/TEAM_ID/billing/invoices' \
-H "Authorization: Bearer $AXUZ_TOKEN"Node.js
const res = await fetch("https://api-billing.axuz.net/v1/teams/TEAM_ID/billing/invoices", {
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/v1/teams/TEAM_ID/billing/invoices",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())