创建子用户软件包
通过此 API,您可以从当前活动资费中创建带流量的子套餐。子套餐的有效期不得超过当前活动资费的有效期。流量以字节为单位指定,指定的流量将从当前活动资费中保留,但不得超过可用流量。
终点:
POSThttps://proxy-seller.com/personal/api/v1/{YourApiKey}/residentsubuser/create
路径参数:
名称 | 价值 | 说明 |
|---|---|---|
授权 |
| 您的个人应用程序接口密钥 |
请求正文:
名称 | 类型 | 说明 |
|---|---|---|
is_link_date | 布尔 | "如果为'true',过期日期将与主软件包相关联。 |
自转 | 数量 | 指定旋转类型:"-1"= 不旋转(Sticky),"0"= 按请求旋转,"1 "至 "3600"= 按时间(秒)旋转。 |
流量限制 | 字符串 | 为子用户软件包分配的字节数。 |
过期时间 | 字符串 | 子用户软件包的到期日期。 |
例如
https://proxy-seller.com/personal/api/v1/fj4948ffhg58gh843gh/residentsubuser/create回应:
{
"status": "success",
"data": {
"rotation": 60,
"traffic_limit": "7516192768",
"expired_at": "d.m.Y",
"is_link_date": true,
"is_active": true,
"package_key": "1234567890abcdefedcb",
"traffic_usage": "10",
"traffic_left": "10",
"traffic_usage_sub": "10",
"traffic_limit_sub": "10",
"traffic_left_sub": "10"
},
"errors": []
}{
"status": "error",
"data": null,
"errors": [
{
"message": "Error api key",
"code": 503,
"customData": null
},
{
"message": "IP not allowed",
"code": 503,
"customData": null
},
{
"message": "Request limit reached",
"code": 503,
"customData": null
}
]
}{
"status": "error",
"data": null,
"errors": [
{
"message": "IP not allowed",
"code": 503,
"customData": null
}
]
}{
"status": "error",
"data": null,
"errors": [
{
"message": "Set [ traffic_limit ] less than [ traffic_left - 1 ] in main package: 27380416559",
"code": 0,
"customData": null
}
]
}