List dynamic traffic products
List currently purchasable dynamic traffic products and tiered unit prices. Use a product_code returned by this API when purchasing.
API information
| Item | Value |
|---|---|
| Method | GET |
| Path | /open-api/v1/dynamic/traffic/products |
| Authentication | X-API-Key |
| Processing | Synchronous |
Request parameters
This API accepts no query parameters or request body. Product names follow X-LANG.
Request example
curl --request GET \
--url 'https://api-test.puraroute.com/gin/open-api/v1/dynamic/traffic/products' \
--header 'Accept: application/json' \
--header 'X-API-Key: <YOUR_API_KEY>' \
--header 'X-LANG: en_US'
Response fields
data is an array of products.
| Field | Type | Nullable | Description |
|---|---|---|---|
product_code |
string | No | Stable product code; pass it unchanged when purchasing |
name |
string | No | Product name |
fixed_traffic_gb |
string | Yes | Traffic quantity for a fixed specification; null for a custom specification |
allow_custom_quantity |
boolean | No | Whether a purchase quantity may be specified |
min_purchase_gb |
string | Yes | Minimum purchase quantity |
max_purchase_gb |
string | Yes | Maximum purchase quantity |
purchase_step_gb |
string | Yes | Purchase quantity increment |
valid_days |
integer | Yes | Validity period after purchase; null means permanently valid |
currency |
string | No | Settlement currency |
tiers |
array | No | Tiered price array |
Each tiers item contains:
| Field | Type | Nullable | Description |
|---|---|---|---|
min_exclusive |
string | Yes | Exclusive lower traffic boundary for the tier |
max_inclusive |
string | Yes | Inclusive upper traffic boundary; null means no upper limit |
unit_price |
string | No | USD price per GB for this tier, as a decimal string |
Pricing method
Dynamic traffic uses cumulative tiered pricing. The entire purchase quantity is not priced at a single tier. When a purchase crosses multiple tiers, multiply the traffic covered by each tier by that tier's unit_price, then add the tier amounts:
Total amount = Σ (traffic covered by each tier × that tier's unit price)
The total is rounded to four decimal places using HALF_UP. Tiered prices returned by the product query are estimates only. The price is recalculated using the currently effective configuration when the purchase is submitted. The authoritative amount is order_amount in the purchase response.
Successful response example
The following values illustrate the response format. Use the API's real-time response as the source of truth for available products and specifications.
{
"code": 0,
"msg": "success",
"data": [
{
"product_code": "DYNAMIC_1GB",
"name": "Dynamic Traffic",
"fixed_traffic_gb": "1.000000",
"allow_custom_quantity": false,
"min_purchase_gb": null,
"max_purchase_gb": null,
"purchase_step_gb": null,
"valid_days": 30,
"currency": "USD",
"tiers": [
{
"min_exclusive": "0.000000",
"max_inclusive": null,
"unit_price": "0.850000"
}
]
}
],
"next": null
}
Possible error codes
code |
Description |
|---|---|
400001 |
Authentication failed |
400009 |
The request contains unsupported parameters |
500000 |
System processing failed; the request did not complete |