查詢流量分配訂單
查詢當前商戶分配流量記錄。用於核對套餐/流量曾向哪些子帳號做過分配及分配量、時間。
介面資訊
GET /client/plan/order/allocations
請求頭
| 參數名稱 | 必選 | 類型 | 說明 |
|---|---|---|---|
| x-merchant-token | 是 | string | 商戶訪問令牌 |
| x-merchant-code | 是 | string | 商戶編碼 |
請求參數
| 參數名稱 | 必選 | 類型 | 說明 |
|---|---|---|---|
| pageNum | 否 | Integer | 頁碼 |
| pageSize | 否 | Integer | 每頁數量 |
列表按 create_time 倒序(最新在前)。
回應示例
{
"total": 2,
"rows": [
{
"account_id": "384940",
"plan_traffic_gb": 100.00,
"create_time": "2025-07-22 11:19:40"
},
{
"account_id": "384941",
"plan_traffic_gb": 50.5,
"create_time": "2025-07-21 09:00:00"
}
],
"code": 200,
"msg": "查詢成功"
}
回應參數說明
| 參數名稱 | 類型 | 說明 |
|---|---|---|
| total | Long | 總記錄數 |
| rows | Array | 當前頁數據 |
| code | Integer | 業務狀態碼 |
| msg | String | 提示資訊 |
| rows[].account_id | String | 業務子帳號ID |
| rows[].plan_traffic_gb | Number | 該筆分配的計劃流量(GB) |
| rows[].create_time | String | 創建時間,yyyy-MM-dd HH:mm:ss |
代碼示例
fetch('/client/plan/order/allocations?pageNum=1&pageSize=20', {
method: 'GET',
headers: {
'x-merchant-token': 'your_token',
'x-merchant-code': 'your_code'
}
})
.then((r) => r.json())
.then((data) => console.log(data));