GET /v1/teams/{teamId}/billing/invoices
Últimas 100 faturas do time
- 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/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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes |
Responses
200
lista
| Name | Type | Required | Description |
|---|---|---|---|
items | array<BillingInvoice> | no | |
items[].id | string<uuid> | no | |
items[].team_id | string<uuid> | no | |
items[].subscription_id | string<uuid> | null | no | |
items[].number | string | no | |
items[].status | string | no | enum: |
items[].currency | string | no | |
items[].subtotal_cents | integer | no | |
items[].tax_cents | integer | no | |
items[].discount_cents | integer | no | |
items[].total_cents | integer | no | |
items[].issued_at | string<date-time> | no | |
items[].due_at | string<date-time> | no | |
items[].paid_at | string<date-time> | null | no | |
items[].period_start | string<date-time> | null | no | |
items[].period_end | string<date-time> | null | no | |
items[].pdf_url | string | no | |
items[].tax_id_snapshot | string | no | |
items[].billing_email | string | no | |
items[].provider | string | no | |
items[].provider_inv_id | string | no | |
items[].notes | string | no | |
items[].created_at | string<date-time> | no | |
items[].updated_at | string<date-time> | no | |
items[].items | array<BillingInvoiceItem> | no | |
items[].items[].id | string<uuid> | no | |
items[].items[].invoice_id | string<uuid> | no | |
items[].items[].description | string | no | |
items[].items[].quantity | integer | no | |
items[].items[].unit_cents | integer | no | |
items[].items[].amount_cents | integer | no | |
items[].items[].metadata | object | no | |
items[].payments | array<BillingPayment> | no | |
items[].payments[].id | string<uuid> | no | |
items[].payments[].invoice_id | string<uuid> | no | |
items[].payments[].team_id | string<uuid> | no | |
items[].payments[].amount_cents | integer | no | |
items[].payments[].currency | string | no | |
items[].payments[].status | string | no | enum: |
items[].payments[].method | string | no | |
items[].payments[].provider | string | no | |
items[].payments[].provider_pay_id | string | no | |
items[].payments[].failure_reason | string | no | |
items[].payments[].paid_at | string<date-time> | null | no | |
items[].payments[].created_at | string<date-time> | 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 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())