OpenAPI Documentation
OpenAPI Documentation

List Daily Dynamic Traffic Usage

Returns paginated daily traffic usage for dynamic sub-accounts, grouped by calendar day in the Asia/Shanghai time zone.

API Information

Item Value
Method GET
Path /open-api/v1/dynamic/traffic/usage/daily
Authentication X-API-Key
Processing Synchronous

Query Parameters

Parameter Type Required Default Description
dynamic_account_id string No All accounts Dynamic sub-account ID; if provided, it must be accessible and must not be an empty string
stat_date_start string No Today minus 29 days Inclusive start date in yyyy-MM-dd format
stat_date_end string No Today Inclusive end date in yyyy-MM-dd format
page_no integer No 1 Page number; must be at least 1
page_size integer No 20 1100 records per page

The start date must not be later than the end date. If only one boundary is provided, the other boundary still uses the default shown above.

Request Example

curl --request GET \
  --url 'https://api-test.puraroute.com/gin/open-api/v1/dynamic/traffic/usage/daily?stat_date_start=2026-08-01&stat_date_end=2026-08-24&page_no=1&page_size=20' \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <YOUR_API_KEY>'

Response Fields

data uses the pagination structure. Each element in list contains:

Field Type Description
id string Daily usage record ID
dynamic_account_id string Dynamic sub-account ID
sub_account string Sub-account name
stat_date string Statistics date in yyyy-MM-dd format
usage_traffic_gb string Traffic used that day in GB
last_sync_time string Most recent update time in GMT+8 ISO-8601 format

Successful Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "list": [
      {
        "id": "1912345678901234567",
        "dynamic_account_id": "1912345678901234568",
        "sub_account": "team_a_01",
        "stat_date": "2026-08-24",
        "usage_traffic_gb": "0.125000",
        "last_sync_time": "2026-08-25T00:05:00.000+08:00"
      }
    ],
    "total": 1,
    "page_no": 1,
    "page_size": 20
  },
  "next": null
}

Possible Error Codes

code Description
300001 The specified dynamic sub-account does not exist or is not accessible
400001 Authentication failed
400009 The date range, pagination, or another parameter does not meet the requirements
500000 System processing failed and the request was not completed

The caller is responsible for aggregating values across pages.

On this page