Skip to main content

Dynamic Traffic


1. Get my traffic recharge records

GET /open/dynamic/myRechargeFlowList

Description: Returns your traffic recharge records with pagination and filters.

Request parameters

NameTypeRequiredDescriptionDefault
pageNumIntegerNoPage number1
pageSizeIntegerNoPage size10
typeIntegerNo0 = recharge; 1 = consumption0
accountStringNoTarget accountnull
startDateStringNoStart date (yyyy-MM-dd)null
endDateStringNoEnd date (yyyy-MM-dd)null

Response format

FieldTypeDescription
codeInteger200 = success
msgStringMessage
dataObjectPayload
data.totalLongTotal records
data.rowsArray<Object>Rows
data.rows[].customerIdLongCustomer ID
data.rows[].accountStringAccount
data.rows[].flowCountBigDecimalTraffic (MB)
data.rows[].typeDescStringType description
data.rows[].createIdLongOperator ID
data.rows[].createByStringOperator account
data.rows[].createTimeStringCreated at (yyyy-MM-dd HH:mm:ss)

Request example

GET http://user.ipweb.cc/prod-api/open/dynamic/myRechargeFlowList?pageNum=1&pageSize=10&type=0&account=test@cc.cc&startDate=2025-04-20&endDate=2025-09-20

Response example

Success:

{
"code": 200,
"msg": "查询成功",
"data": {
"total": 2,
"rows": [
{
"customerId": 12345,
"account": "customer1",
"flowCount": 100.0,
"typeDesc": "充值",
"createId": 98765,
"createBy": "admin",
"createTime": "2025-11-17 10:30:00"
},
{
"customerId": 12346,
"account": "customer2",
"flowCount": -20.0,
"typeDesc": "消耗",
"createId": 98765,
"createBy": "admin",
"createTime": "2025-11-17 11:15:00"
}
],
"code": 200,
"msg": "查询成功"
}
}

Authentication failed:

{
"code": 200,
"msg": "无效的认证令牌",
"data": null
}

2. Get traffic recharge records credited to me

GET /open/dynamic/rechargeFlowListForMe

Description: Returns recharge records where you are the recipient, with pagination and filters.

Request parameters

NameTypeRequiredDescriptionDefault
pageNumIntegerNoPage number1
pageSizeIntegerNoPage size10
accountStringNoSource recharge accountnull
startDateStringNoStart date (yyyy-MM-dd)null
endDateStringNoEnd date (yyyy-MM-dd)null

Response format

Same as Get my traffic recharge records.

Request example

GET http://user.ipweb.cc/prod-api/open/dynamic/rechargeFlowListForMe?pageNum=1&pageSize=10&type=0&account=admin@cc.cc&startDate=2025-04-20&endDate=2025-09-20

Response example

Success:

{
"code": 200,
"msg": "查询成功",
"data": {
"total": 1,
"rows": [
{
"customerId": 12347,
"account": "customer3",
"flowCount": 50.0,
"typeDesc": "充值",
"createId": 54321,
"createBy": "myself",
"createTime": "2025-11-17 09:15:00"
}
],
"code": 200,
"msg": "查询成功"
}
}

3. Get agent customer traffic usage report

GET /open/dynamic/flowReport

Description: Returns traffic usage per customer with pagination and filters.

Request parameters

NameTypeRequiredDescriptionDefault
pageNumIntegerNoPage number1
pageSizeIntegerNoPage size (max 2000)100
customerIdLongNoFilter by customer ID; omit for all customers under agentnull
startDateStringNoStart date (yyyy-MM-dd)null
endDateStringNoEnd date (yyyy-MM-dd)null

Response format

FieldTypeDescription
codeInteger200 = success
msgStringMessage
dataObjectPayload
data.rows[].reportDateStringDate (yyyy-MM-dd)
data.rows[].customerIdIntegerCustomer ID
data.rows[].userNameStringLogin username
data.rows[].uploadFlowDoubleUpload traffic (MB)
data.rows[].downloadFlowDoubleDownload traffic (MB)

Request example

curl -X GET "http://user.ipweb.cc/prod-api/open/dynamic/flowReport?customerId=39&pageSize=10&pageNum=1&startDate=2021-12-26&endDate=2025-12-26" -H "token: your-access-token"

Response example

Success:

{
"msg": "操作成功",
"code": 200,
"data": {
"total": 1049,
"rows": [
{
"reportDate": "2025-12-25",
"customerId": 39,
"userName": "xxxx@gmaill.com",
"uploadFlow": 596.9,
"downloadFlow": 57500.89
}
],
"code": 200,
"msg": "查询成功",
"other": null
}
}

4. Multi-type traffic summary

GET /api/agent/getFlowTotalFull

Response fields

NameTypeDescription
codeInteger200 = success
msgStringMessage
dataJsonObject
accountJsonPrimary account traffic
account.flowCountFloatRecharged traffic (MB)
account.consumeFlowFloatConsumed traffic (MB)
account.residualFlowFloatRemaining traffic (MB)
account2JsonSecondary account traffic
account2.flowCountFloatRecharged traffic (MB)
account2.consumeFlowFloatConsumed traffic (MB)
account2.residualFlowFloatRemaining traffic (MB)

Response example

{
"msg": "操作成功",
"code": 200,
"data": {
"account2": {
"consumeFlow": 0.00,
"residualFlow ": 5242880.00,
"flowCount": 5242880,
"residualFlow": 5242880.00
},
"account": {
"consumeFlow": 0.0,
"residualFlow ": 0.00,
"flowCount": 0.00,
"residualFlow": 0.00
}
}
}

5. NNI traffic consumption details

GET /api/agent/getNNIFlowConsumeDetail?startDate=2023-06-20&endDate=2023-06-21

Request parameters

NameRequiredTypeDescription
startDateNoStringStart date
endDateNoStringEnd date

Response fields

NameTypeDescription
codeInteger200 = success
msgStringMessage
dataArray
dateStringDate
flowFloatConsumed traffic (MB)

Response example

{
"msg": "操作成功",
"code": 200,
"data": [
{
"date": "2023-06-20",
"flow": 21889.75
},
{
"date": "2023-06-21",
"flow": 32335.47
}
]
}

6. Traffic consumption details

GET /api/agent/getFlowConsumeDetail?startDate=2023-06-20&endDate=2023-06-21

Request parameters

NameRequiredTypeDescription
startDateNoStringStart date
endDateNoStringEnd date

Response fields

NameTypeDescription
codeInteger200 = success
msgStringMessage
dataArray
dateStringDate
uploadFlowFloatUpload traffic (MB)
downloadFlowFloatDownload traffic (MB)

Response example

{
"msg": "操作成功",
"code": 200,
"data": [
{
"date": "2023-06-20",
"downloadFlow": 21889.75,
"uploadFlow": 6529.83
},
{
"date": "2023-06-21",
"downloadFlow": 32335.47,
"uploadFlow": 11423.92
}
]
}

7. Recharge traffic

GET /api/agent/rechargeTrafficCount?customerId=88&orderId=123456&trafficCount=1.01

Request parameters

NameRequiredTypeDescription
customerIdYesStringTarget customer ID
orderIdYesStringOrder ID (idempotency)
trafficCountYesfloatAmount to recharge (GB)

Response fields

NameTypeDescription
codeInteger200 success; 203 order already processed; 204 not your channel customer; else failure
msgStringMessage

Response example

{
"msg": "该订单已处理",
"code": 201
}

{
"msg": "充值成功",
"code": 200
}

8. Deduct traffic

GET /api/agent/deductionFlow?customerId=88&trafficCount=1.01

Request parameters

NameRequiredTypeDescription
customerIdYesStringTarget customer ID
trafficCountYesfloatAmount to deduct (GB)

Response fields

NameTypeDescription
codeInteger200 = success; other values = failure
msgStringMessage

Response example

{
"msg": "扣除成功",
"code": 200
}

© 2025 Dynamic Traffic API — v1.0.0

Last updated: December 26, 2025