查询指定用户的流量余额信息。
GET /client/dynamics/account/balance/info
| 参数名 | 类型 | 描述 |
| x-merchant-token | String | 商户令牌 |
| x-merchant-code | String | 商户代码 |
| Content-Type | String | application/json |
| 参数名 | 必选 | 类型 | 描述 |
| accountId | 是 | Long | 账号ID |
| pageSize | 否 | Integer | 每页显示记录数 |
| pageNum | 否 | Integer | 当前页码 |
{
"total": 1,
"rows": [
{
"accountId": "816219",
"balance": 326999.978943,
"balanceFormat": "326999.98 MB",
"balanceTotal": 327000.000000,
"balanceTotalFormat": "327000.00 MB",
"balanceUsed": 0.021057,
"balanceUsedFormat": "0.02 MB"
}
],
"code": 200,
"msg": "查询成功"
}
// 使用 fetch 查询余额
fetch('/client/dynamics/account/balance/info?accountId=123&pageSize=10&pageNum=1', {
method: 'GET',
headers: {
'x-merchant-token': 'your_token',
'x-merchant-code': 'your_code',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
| 参数名 | 类型 | 描述 |
| accountId | Long | 用户账号ID |
| balance | BigDecimal | 剩余流量(MB) |
| balanceFormat | String | 剩余流量(格式化) |
| balanceTotal | BigDecimal | 总流量(MB) |
| balanceTotalFormat | String | 总流量(格式化) |
| balanceUsed | BigDecimal | 已使用流量(MB) |
| balanceUsedFormat | String | 已使用流量(格式化) |