OpenAPI Documentation
OpenAPI Documentation
List Active Traffic Lots
Returns a paginated list of dynamic traffic lots that are already effective and have not expired.
API Information
| Item | Value |
|---|---|
| Method | GET |
| Path | /open-api/v1/dynamic/traffic/lots |
| Authentication | X-API-Key |
| Processing | Synchronous |
Query Parameters
| Parameter | Type | Required | Default | Constraint |
|---|---|---|---|---|
page_no |
integer | No | 1 |
Must be at least 1 |
page_size |
integer | No | 20 |
1–100 |
This endpoint does not support filtering by status, effective time, or expiration time.
Request Example
curl --request GET \
--url 'https://api-test.puraroute.com/gin/open-api/v1/dynamic/traffic/lots?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 | Nullable | Description |
|---|---|---|---|
id |
string | No | Traffic lot ID |
purchased_traffic_gb |
string | No | Traffic purchased in this lot |
consumed_traffic_gb |
string | No | Traffic consumed from this lot |
expired_traffic_gb |
string | No | Traffic expired from this lot |
remaining_traffic_gb |
string | No | Traffic remaining in this lot |
status |
string | No | Currently always ACTIVE |
effective_time |
string | No | Effective time in GMT+8 ISO-8601 format |
expire_time |
string | Yes | Expiration time; null means there is no expiration time |
create_time |
string | No | Creation time in GMT+8 ISO-8601 format |
Successful Response Example
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"id": "1912345678901234567",
"purchased_traffic_gb": "10.000000",
"consumed_traffic_gb": "1.250000",
"expired_traffic_gb": "0.000000",
"remaining_traffic_gb": "8.750000",
"status": "ACTIVE",
"effective_time": "2026-08-24T15:30:00.000+08:00",
"expire_time": "2026-09-23T15:30:00.000+08:00",
"create_time": "2026-08-24T15:30:00.000+08:00"
}
],
"total": 1,
"page_no": 1,
"page_size": 20
},
"next": null
}
Possible Error Codes
code |
Description |
|---|---|
400001 |
Authentication failed |
400009 |
Pagination or an unknown parameter does not meet the requirements |
500000 |
System processing failed and the request was not completed |