查询流量分配订单

查询当前商户分配流量记录。用于核对套餐/流量曾向哪些子账号做过分配及分配量、时间。

接口信息

GET /client/plan/order/allocations

请求头

参数名必选类型说明
x-merchant-tokenstring商户访问令牌
x-merchant-codestring商户编码

请求参数

参数名必选类型说明
pageNumInteger页码
pageSizeInteger每页数量

列表按 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));