查詢流量分配訂單

查詢當前商戶分配流量記錄。用於核對套餐/流量曾向哪些子帳號做過分配及分配量、時間。

介面資訊

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": "查詢成功"
}

回應參數說明

參數名稱類型說明
totalLong總記錄數
rowsArray當前頁數據
codeInteger業務狀態碼
msgString提示資訊
rows[].account_idString業務子帳號ID
rows[].plan_traffic_gbNumber該筆分配的計劃流量(GB)
rows[].create_timeString創建時間,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));