查询每日余额
使用此端点查询指定日期的每日余额。
可用环境
- 生产环境
https://api.gateway.com.br/core
端点
- 方法:
GET - 端点:
/wallet/daily-balance/{date} - 认证方式:Bearer token
路径参数
| 名称 | 类型 | 必填 | 说明 | 校验规则 |
|---|---|---|---|---|
date | string (ISO) | 是 | 当天的日期 | 必须为不含时间的 ISO 日期字符串 |
请求示例
- cURL
- JavaScript
curl --request GET \
--url https://api.gateway.com.br/core/wallet/daily-balance/553e8400-e29b-41d4-a716-436251480000 \
--header 'Authorization: Bearer your-jwt-token'
const response = await fetch('https://api.gateway.com.br/core/wallet/daily-balance/553e8400-e29b-41d4-a716-436251480000 ', {
method: 'GET',
headers: {
'Authorization': 'Bearer your-jwt-token'
}
});
const data = await response.json();
成功响应
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string (UUID) | 是 | 唯一标识 |
totalCredits | number | 是 | 入账合计(整数,以分为单位) |
totalDebits | number | 是 | 出账合计(整数,以分为单位) |
balanceChange | number | 是 | 余额变动(整数,以分为单位) |
openingBalance | number | 是 | 期初余额(整数,以分为单位) |
closingBalance | number | 是 | 期末余额(整数,以分为单位) |
date | string | 是 | 当天的日期 |
createdAt | string (ISO) | 是 | 创建时间 |
响应示例
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"totalCredits": 100000,
"totalDebits": 30000,
"balanceChange": 70000,
"openingBalance": 400000,
"closingBalance": 470000,
"date": "2026-03-06T12:49:04.681Z",
"createdAt": "2026-03-06T12:49:04.681Z"
}
可能的错误
| 状态码 | 说明 | 处理方式 |
|---|---|---|
| 401 | 凭据无效 | 请检查您的凭据 |
| 403 | 无权限或未授权 | 请联系技术支持 |
| 404 | 未找到当天的余额 | 请联系技术支持 |
| 500 | 内部错误 | 请联系技术支持 |