query traffic package price
POST
/api/price/traffic_packagereturn data array defined the traffic amount range, price and valid days, valid days is 30,
data array sorted by traffic amount
example:
[
{
"id": 1,
"traffic_type": "rotation_residential",
"traffic_amount_gb": 20,
"valid_days": 30,
"price_per_gb": 3,
"created_unixtime": 1678606170
},
{
"id": 2,
"traffic_type": "rotation_residential",
"traffic_amount_gb": 100,
"valid_days": 30,
"price_per_gb": 3,
"created_unixtime": 1678606188
},
{
"id": 24,
"traffic_type": "rotation_residential",
"traffic_amount_gb": 500,
"valid_days": 30,
"price_per_gb": 2,
"created_unixtime": 1686552755
},
{
"id": 3,
"traffic_type": "rotation_residential",
"traffic_amount_gb": 99999999999999,
"valid_days": 30,
"price_per_gb": 1.5,
"created_unixtime": 1678606217
}
]
means
traffic 20-100GB $3.00/GB
traffic 100-500GB $2.00/GB
traffic 500+GB $1.50/GB
请求参数
Body Params application/json
filter
object
optional
query condition
traffic_type
string
optional
one of the following traffic type:"rotation_residential" or "rotation_datacenter"
from_db
boolean
required
from db or cache
limit
integer
required
query quantity for pagination
offset
integer
required
query offset for pagination
Example
{
"from_db": true,
"limit": 10,
"offset": 0,
"filter": {
"traffic_type": "rotation_residential"
}
}
示例代码
Responses
result(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
data
array [object {6}]
required
query result
created_unixtime
integer
required
id
integer
required
price_per_gb
number
required
traffic_amount_gb
integer
required
traffic_type
string
required
valid_days
integer
required
meta_message
string
required
success or other error msg
meta_status
integer
required
1 for success, negative for error
total_count
integer
required
total record quantity
Example
{
"data": [
{
"created_unixtime": 0,
"id": 0,
"price_per_gb": 0,
"traffic_amount_gb": 0,
"traffic_type": "string",
"valid_days": 0
}
],
"meta_message": "string",
"meta_status": 0,
"total_count": 0
}
Last modified: 1 年前