Listar Histórico de Saldo
Utilize este endpoint para listar o histórico de saldo com filtros.
Ambientes Disponíveis
- Produção
https://api.unoip.com.br
Endpoint
- Método:
GET - Endpoint:
/wallet/ledger-entry - Autenticação: Bearer token
Query Params
ℹ️ Datas em ISO
Os campos startDate e endDate devem ser enviados em ISO date string com horário.
Exemplo:
2026-03-06T12:00:00.000Z
| Nome | Tipo | Obrigatório | Descrição | Validações |
|---|---|---|---|---|
startDate | string | Não | Data inicial do filtro | Deve ser ISO date string com horário |
endDate | string | Não | Data final do filtro | Deve ser ISO date string com horário |
type | string[] (enum) - CREDIT, DEBIT | Não | Lista de tipos para filtrar | Deve ser um array não vazio e sem duplicados |
Exemplo de Requisição
- cURL
- JavaScript
curl --request GET \
--url https://api.unoip.com.br/wallet/ledger-entry?type=DEBIT&startDate=2026-03-06T00:00:00.000Z&endDate=2026-03-06T23:59:59.999Z \
--header 'Authorization: Bearer seu-token-jwt'
const params = new URLSearchParams({
startDate: '2026-03-06T00:00:00.000Z',
endDate: '2026-03-06T23:59:59.999Z'
});
params.append('type', 'DEBIT');
const response = await fetch(`https://api.unoip.com.br/wallet/ledger-entry?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer seu-token-jwt'
}
});
const data = await response.json();
Resposta de Sucesso
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
total | number | Sim | Total de itens |
totalPages | number | Sim | Total de páginas |
currentPage | number | Sim | Página atual |
perPage | number | Sim | Itens por página |
data | array | Sim | Lista |
Campos do item em data
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
id | string (UUID) | Sim | Identificador único |
transactionId | string (UUID) | Sim | Identificador único da transação |
amount | number | Sim | Valor (inteiro em centavos) |
balanceBefore | number | Sim | saldo anterior (inteiro em centavos) |
balanceAfter | number | Sim | novo saldo (inteiro em centavos) |
type | string (enum) - CREDIT, DEBIT | Sim | Tipo |
description | string | Não | Descrição do evento |
date | string | Sim | Data do evento |
Exemplo de Resposta
{
"total": 3,
"totalPages": 1,
"currentPage": 1,
"perPage": 15,
"data": [
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 10000,
"balanceBefore": 50000,
"balanceAfter": 60000,
"type": "CREDIT",
"description": "Transaction payment",
"date": "2026-03-06T12:49:04.681Z",
},
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 1000,
"balanceBefore": 60000,
"balanceAfter": 59000,
"type": "DEBIT",
"description": "Transaction payment - Fee",
"date": "2026-03-06T12:49:04.681Z",
},
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 2000,
"balanceBefore": 59000,
"balanceAfter": 57000,
"type": "DEBIT",
"description": "Transaction payment - Reserve",
"date": "2026-03-06T12:49:04.681Z",
}
]
}
Possíveis Erros
| Código | Descrição | Solução |
|---|---|---|
| 401 | Credenciais inválidas | Verifique suas credenciais |
| 403 | Sem permissão/autorização | Contate o suporte |
| 422 | Dados inválidos ou faltando | Verifique o formato dos dados |
| 500 | Erro interno | Contate o suporte |