NSocks
app_key 認證金鑰請登錄後在個人中心首頁查看。
請安全保存金鑰,金鑰擁有您的帳戶管理员權限。
認證方式
App Key 認證
POST 參數:
app_key: {your_app_key}
或作為查詢參數:
?app_key={your_app_key}
回應格式
所有介面返回統一的 JSON 格式:
{
"code": 200,
"message": "操作成功",
"data": {}
}
code: 狀態碼,200 表示成功,其他值表示失敗message: 回應消息(中文)data: 回應數据
Base URLs:
Authentication
- HTTP Authentication, scheme: bearer
- API Key (apiKeyAuth)
- Parameter Name: app_key, in: query. 支持GET/POST,name 支持
代理帳戶管理
GET 代理帳戶列表
GET /ep/whitelist-account/list
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"id": 0,
"username": "string",
"password": "string",
"created_at": "string",
"remark": "string",
"product_type": 9,
"usage_flow": 0,
"limit_flow": 102400,
"status": 0
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | responseCode | false | none | 狀態碼,200 成功、3 app_key 無效 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» id | integer | false | none | 帳戶編號 | |
| »»» username | string | false | none | 代理帳戶名 | |
| »»» password | string | false | none | 代理帳戶密碼 | |
| »»» created_at | string | false | none | 新增時間 | |
| »»» remark | string | false | none | 备注 | |
| »»» product_type | productTypes | false | none | 套餐類型,9 動態住宅流量套餐、11 動態住宅IP、14靜態數據中心IP、25 靜態住宅IP | |
| »»» usage_flow | integer | false | none | 已使用流量,单位:KB | |
| »»» limit_flow | integer | false | none | 自定义流量上限:单位GB最大102400,0 不限制 | |
| »»» status | integer | false | none | 启用狀態:1启用,0停用 |
枚舉值
| 屬性 | 值 |
|---|---|
| product_type | 9 |
| product_type | 11 |
| product_type | 14 |
| product_type | 25 |
POST 新增代理帳戶。
POST /ep/whitelist-account/add
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"accounts": "user01:pass,user02:pass,user03:pass",
"remark": "",
"product_type": 9
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » accounts | body | string | 否 | 帳戶密碼,請按格式 username:password 填寫,帳戶和密碼仅支持數字和字母,禁止输入任何特殊符号或空格,冒号隔開帳戶和密碼。支持批量新增,英文逗号(,)分隔代理帳戶。 |
| » remark | body | string | 否 | 代理帳戶描述 |
| » product_type | body | productTypes | 否 | 套餐類型,9 動態住宅流量套餐、11 動態住宅IP、14靜態數據中心IP、25 靜態住宅IP |
枚舉值
| 屬性 | 值 |
|---|---|
| » product_type | 9 |
| » product_type | 11 |
| » product_type | 14 |
| » product_type | 25 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 刪除代理帳戶
POST /ep/whitelist-account/delete
請注意刪除後無法恢復,已使用流量等無法查詢。刪除约有5分钟等待時間,在此期间仍可能产生费用。
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"accounts": "user01,user02"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » accounts | body | string | 否 | 代理帳戶,仅支持數字和字母。支持批次操作,英文逗号(,)分隔代理帳戶 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 禁用代理帳戶
POST /ep/whitelist-account/disable
禁用约有5分钟等待時間,在此期间仍可能产生费用。
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"accounts": "user01,user02"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » accounts | body | string | 否 | 代理帳戶,仅支持數字和字母。支持批次操作,英文逗号(,)分隔代理帳戶 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 启用代理帳戶
POST /ep/whitelist-account/enable
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"accounts": "user01,user02"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » accounts | body | string | 否 | 代理帳戶,仅支持數字和字母。支持批次操作,英文逗号(,)分隔代理帳戶 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 修改代理帳戶密碼
POST /ep/whitelist-account/change-password
請注意修改後有5分钟等待時間,在此期间舊密碼仍可能正常使用。
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"account": "user",
"password": "pass"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » account | body | string | 否 | 代理帳戶,仅支持數字和字母。 |
| » password | body | string | 否 | 代理帳戶新密碼,仅支持數字和字母。 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 修改代理帳戶备注
POST /ep/whitelist-account/change-remark
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"account": "user",
"remark": ""
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » account | body | string | 否 | 代理帳戶,仅支持數字和字母。 |
| » remark | body | string | 否 | 代理帳戶新备注,32个中文或64个英文以内。 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 修改代理帳戶流量上限
POST /ep/whitelist-account/change-limit
請注意流量統計可能有5分钟以内延迟,即实际消耗流量可能超過此限制。
Body 請求參數
{
"app_key": "stringstringstringstringstringst",
"account": "user",
"limit": 0
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » account | body | string | 否 | 代理帳戶,仅支持數字和字母。 |
| » limit | body | integer | 否 | 流量限制,单位:GB,0為不设上限 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 修改代理帳戶信息
POST /ep/proxy-account/change
修改代理帳戶密碼、备注、流量限制、每日流量限制、启用狀態或 UDP 開關。
Body 請求參數
{
"app_key": "string",
"account": "string",
"password": "string",
"remark": "string",
"limit": 0,
"daily_limit": 0,
"status": 0,
"udp": 0
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » account | body | string | 否 | 代理帳戶名 |
| » password | body | string | 否 | 新密碼,6-16 位數字或字母;不传则不修改 |
| » remark | body | string | 否 | 新备注 |
| » limit | body | integer | 否 | 流量上限,单位 GB,0 表示不限制 |
| » daily_limit | body | integer | 否 | 每日流量上限,单位 GB,0 表示不限制 |
| » status | body | integer | 否 | 启用狀態 |
| » udp | body | integer | 否 | UDP 支持開關,仅對套餐類型 14、16、21、25 生效 |
枚舉值
| 屬性 | 值 |
|---|---|
| » status | 0 |
| » status | 1 |
| » udp | 0 |
| » udp | 1 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
IP白名单
GET IP 白名单列表
GET /ep/proxy-ip/list
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| product_type | query | integer | 否 | 套餐類型編號 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"ip": "1.1.1.1",
"remark": "string",
"product_type": 0,
"created_at": "string"
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» ip | string | false | none | 白名单 IP | |
| »»» remark | string | false | none | 备注 | |
| »»» product_type | integer | false | none | 套餐類型 | |
| »»» created_at | string | false | none | 建立時間 |
POST 新增 IP 白名单
POST /ep/proxy-ip/add
Body 請求參數
{
"app_key": "string",
"ips": "1.1.1.1,2.2.2.2",
"remark": "string",
"product_type": 0,
"user_product_id": 0
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » ips | body | string | 否 | 需要新增的白名单 IP,多个用英文逗号或换行分隔 |
| » remark | body | string | 否 | 备注 |
| » product_type | body | integer | 否 | 套餐類型編號 |
| » user_product_id | body | integer | 否 | 使用者套餐 ID,套餐類型為 11 时必填 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
POST 刪除 IP 白名单
POST /ep/proxy-ip/delete
Body 請求參數
{
"app_key": "string",
"ips": "1.1.1.1,2.2.2.2",
"verify_type": "string",
"verify_code": "string"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
| » app_key | body | string | 否 | 授權金鑰 |
| » ips | body | string | 否 | 需要刪除的白名单 IP,多个用英文逗号分隔 |
| » verify_type | body | string | 否 | 验证類型:phone、email、wechat、totp |
| » verify_code | body | string | 否 | 验证码 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": null
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | null | false | none | none |
流量日誌查詢
GET 使用流量按天汇總
GET /ep/user-usage-flow/total
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| app_key | query | string(password) | 是 | 認證金鑰 |
| start_time | query | string(Y-m-d H:i:s) | 否 | 起始時間,可精确到秒。請注意,日誌記錄有5分钟以内延迟。預設7天以内。 |
| end_time | query | string(Y-m-d H:i:s) | 否 | 截止時間,可精确到秒。請注意,日誌記錄有5分钟以内延迟。預設當前時間。 |
| username | query | string | 否 | 子帳戶名称,預設查詢所有帳戶,可指定子帳戶。請注意如果您新增了相同名称的子帳戶,此查詢將返回同名代理帳戶的所有使用記录。 |
| product_type | query | number | 否 | 套餐類型 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"day": "2022-08-01",
"flow": 0
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» day | string | false | none | 日期 | |
| »»» flow | integer | false | none | 消耗流量,单位KB |
套餐查詢
GET 已购套餐列表
GET /ep/user-product/list
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| app_key | query | string(password) | 是 | 認證金鑰 |
| trade_no | query | string | 否 | 訂單號,請输入完整訂單號。不支持模糊搜索。 |
| page | query | number | 否 | 分頁,預設:1 |
| size | query | number | 否 | 分頁显示數量,預設:20 |
| product_type | query | number | 否 | 套餐類型 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"id": 0,
"created_at": "2022-05-13 12:14:15",
"expired_at": "2022-05-13 12:14:15",
"product_type": 9,
"trade_no": "2022051312134339861461465434",
"order": {
"created_at": "2022-05-13 12:13:43",
"pay_at": "2022-05-13 12:13:43",
"title": "入门级"
}
}
],
"page": 1,
"page_size": 20,
"total_count": 0,
"total_page": 0
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» id | integer | false | none | 套餐編號 | |
| »»» created_at | string | false | none | 套餐生效時間 | |
| »»» expired_at | string | false | none | 套餐過期時間,過期後流量無法使用。 | |
| »»» product_type | productTypes | false | none | 套餐類型,9 動態住宅流量套餐、11 動態住宅IP、14靜態數據中心IP、25 靜態住宅IP | |
| »»» trade_no | string | false | none | 訂單交易号 | |
| »»» order | object | false | none | none | |
| »»»» created_at | string | false | none | 訂單建立時間 | |
| »»»» pay_at | string | false | none | 訂單支付時間 | |
| »»»» title | string | false | none | 訂單描述 | |
| »» page | integer | false | none | 當前分頁 | |
| »» page_size | integer | false | none | 分頁大小 | |
| »» total_count | integer | false | none | 總記录數量 | |
| »» total_page | integer | false | none | 總分頁數量 |
枚舉值
| 屬性 | 值 |
|---|---|
| product_type | 9 |
| product_type | 11 |
| product_type | 14 |
| product_type | 25 |
GET 使用者套餐數据汇總
GET /ep/user-product/summary
获取使用者套餐的統計汇總信息,包括總量、有效量、临期量、過期量等
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| app_key | query | string(password) | 是 | 認證金鑰 |
| product_type | query | integer | 否 | 產品類型,仅支持 9(動態流量套餐)、12(長效IDC流量套餐) |
枚舉值
| 屬性 | 值 |
|---|---|
| product_type | 9 |
| product_type | 12 |
返回範例
200 Response
{
"code": 200,
"msg": "成功",
"data": {
"total": 1048576,
"total_count": 5,
"effective": 524288,
"effective_count": 3,
"effective_total": 786432,
"effective_used": 262144,
"temporary": 102400,
"temporary_count": 1,
"expired": 51200,
"expired_count": 1,
"used": 473088
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» total | integer | false | none | 流量/IP總量(单位:KB) | |
| »» total_count | integer | false | none | 套餐總个數 | |
| »» effective | integer | false | none | 有效剩餘量(单位:KB) | |
| »» effective_count | integer | false | none | 有效套餐个數 | |
| »» effective_total | integer | false | none | 有效總量(单位:KB) | |
| »» effective_used | integer | false | none | 有效已使用量(单位:KB) | |
| »» temporary | integer | false | none | 临期總量(7天内到期,单位:KB) | |
| »» temporary_count | integer | false | none | 临期套餐个數(7天内到期) | |
| »» expired | integer | false | none | 過期剩餘量(单位:KB) | |
| »» expired_count | integer | false | none | 過期套餐个數 | |
| »» used | integer | false | none | 已使用總量(单位:KB) |
IP提取
GET 提取IP
GET /ep/ip/v3
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| app_key | query | string(password) | 是 | 存取金鑰 |
| cc | query | string | 否 | 國家或地區 |
| state | query | string | 否 | 省或州 |
| city | query | string | 否 | 城市 |
| format | query | string | 否 | 获取格式 |
| lb | query | string | 否 | 间隔符,仅text格式有效 |
| num | query | number | 否 | 提取數量 |
| life | query | number | 否 | 保持周期-分钟 |
| ep | query | string | 否 | 代理網路 |
枚舉值
| 屬性 | 值 |
|---|---|
| ep | us |
| ep | hk |
| ep | de |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
[
"150.109.114.72:1140",
"150.109.114.72:1141",
"150.109.114.72:1142",
"150.109.114.72:1143",
"150.109.114.72:1144",
"150.109.114.72:1145",
"150.109.114.72:1146",
"150.109.114.72:1147",
"150.109.114.72:1148",
"150.109.114.72:1149"
]
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [any] | false | none | none |
GET 動態地區城市列表V4
GET /ep/ip/dcl4
按使用者名获取城市列表,需要登錄認證,且帳戶必須属于當前使用者
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| username | query | string | 是 | 代理帳戶使用者名 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"cache": true,
"list": [
{
"City": "Los Angeles",
"Area": "US",
"State": "California"
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» cache | boolean | false | none | 是否來自快取 | |
| »» list | [object] | false | none | none | |
| »»» City | string | false | none | 城市 | |
| »»» Area | string | false | none | 地區 | |
| »»» State | string | false | none | 州/省 |
GET 動態地區州/省列表V4
GET /ep/ip/dsl4
按使用者名获取州/省列表,需要登錄認證,且帳戶必須属于當前使用者
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| username | query | string | 是 | 代理帳戶使用者名 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"cache": true,
"list": [
{
"City": "Los Angeles",
"Area": "US",
"State": "California"
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» cache | boolean | false | none | 是否來自快取 | |
| »» list | [object] | false | none | none | |
| »»» City | string | false | none | 城市 | |
| »»» Area | string | false | none | 地區 | |
| »»» State | string | false | none | 州/省 |
GET 動態地區州/省城市融合列表V4
GET /ep/ip/dal4
按使用者名获取州/省和城市的融合列表,按地區分組。需要登錄認證,且帳戶必須属于當前使用者
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| username | query | string | 是 | 代理帳戶使用者名 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"cache": true,
"list": [
{
"Area": "US",
"states": [
{
"State": null,
"cities": null
}
]
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» cache | boolean | false | none | 是否來自快取 | |
| »» list | [object] | false | none | 地區列表 | |
| »»» Area | string | false | none | 地區代码 | |
| »»» states | [object] | false | none | 州/省列表 | |
| »»»» State | string | false | none | 州/省名称 | |
| »»»» cities | [string] | false | none | 城市列表 |
GET 城市列表
GET /ep/ip/dynamic-citys
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"name_zh_cn": "美国",
"name_en": "United States",
"continent_code": "NA",
"country_code": "US",
"items": [
{
"city": null,
"state": null,
"continent_code": null,
"country_code": null
}
]
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | 列表 | |
| »»» name_zh_cn | string | false | none | 國家或地區名称 | |
| »»» name_en | string | false | none | 國家或地區名称 | |
| »»» continent_code | string | false | none | 大洲代碼 | |
| »»» country_code | string | false | none | 國家或地區代码 | |
| »»» items | [object] | false | none | 省或州 | |
| »»»» city | string | false | none | 城市名称 | |
| »»»» state | string | false | none | 省或州名称代码 | |
| »»»» continent_code | string | false | none | 大洲代碼 | |
| »»»» country_code | string | false | none | 國家或地區代码 |
GET 城市搜索
GET /ep/ip/dynamic-citys/search
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| country_code | query | string | 是 | 國家或地區代码 |
| state | query | string | 是 | 州或省代码 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
"string"
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [string] | false | none | 列表 |
GET 州列表
GET /ep/ip/dynamic-states
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"name_zh_cn": "美国",
"name_en": "United States",
"continent_code": "NA",
"country_code": "US",
"items": [
{
"state": null,
"continent_code": null,
"country_code": null
}
]
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | 列表 | |
| »»» name_zh_cn | string | false | none | 國家或地區名称 | |
| »»» name_en | string | false | none | 國家或地區名称 | |
| »»» continent_code | string | false | none | 大洲代碼 | |
| »»» country_code | string | false | none | 國家或地區代码 | |
| »»» items | [object] | false | none | 省或州 | |
| »»»» state | string | false | none | 省或州名称代码 | |
| »»»» continent_code | string | false | none | 大洲代碼 | |
| »»»» country_code | string | false | none | 國家或地區代码 |
GET 州/省搜索
GET /ep/ip/dynamic-states/search
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| country_code | query | string | 是 | 國家或地區代码 |
返回範例
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
"string"
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未实名認證 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [string] | false | none | 列表 |
GET 提取已購買靜態IP列表
GET /ep/ip/get-static-ip
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| country_code | query | string | 否 | 國家或地區代码 |
| product_type | query | number | 否 | 產品類型, 25:靜態住宅IP, 14: 數據中心IP |
| trade_no | query | string | 否 | 通過訂單號篩選IP |
| page | query | number | 否 | 頁碼 |
| size | query | number | 否 | 每頁數量 |
| status | query | number | 否 | 狀態, 1:有效, 2:無效, 3:即將過期, 4:维护中 |
枚舉值
| 屬性 | 值 |
|---|---|
| product_type | 14 |
| product_type | 25 |
| status | 1 - 2 - 3 - 4 |
返回範例
200 Response
{}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數据結構
GET 获取在售地區靜態IP數量
GET /ep/ip/static-ip-region
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| isp | query | integer | 否 | ISP 篩選,不传则不篩選(站点 1/4/5 除外預設為 1) |
| asn | query | integer | 否 | 是否返回 ASN 分組數据 |
| exclusive | query | integer | 否 | 是否按獨享庫存統計 |
詳細說明
isp: ISP 篩選,不传则不篩選(站点 1/4/5 除外預設為 1)
| 值 | 描述 |
|---|---|
| 0 | 數據中心靜態IP(IDC) |
| 1 | 家庭住宅靜態IP(ISP) |
asn: 是否返回 ASN 分組數据
| 值 | 描述 |
|---|---|
| 0 | 不返回 ASN 分組數据(預設) |
| 1 | 返回 ASN 分組數据 |
exclusive: 是否按獨享庫存統計
| 值 | 描述 |
|---|---|
| 0 | 按當前使用者/共享组口徑統計(預設) |
| 1 | 排除所有已分配IP,仅統計可用庫存 |
枚舉值
| 屬性 | 值 |
|---|---|
| isp | 0 |
| isp | 1 |
| asn | 0 |
| asn | 1 |
| exclusive | 0 |
| exclusive | 1 |
返回範例
200 Response
{
"code": 200,
"msg": "請求成功",
"data": {
"list": [
{
"code": "US",
"number": 55
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» code | string | false | none | 國家或地區代码 | |
| »»» number | integer | false | none | 數量 |
GET 获取 host_pool 支持國家/地區
GET /ep/host-pool/regions
查詢 host_pool 服務當前站点支持的國家/地區列表。
該介面面向數據中心 IP 按流量积分的隨機提取场景,仅按當前站点可用數據中心 IP 庫存統計國家/地區。 不支持 ASN、ISP、獨享庫存篩選,也不會按使用者已購買記录排除 IP。
返回範例
200 Response
{
"code": 200,
"msg": "請求成功",
"data": {
"list": [
{
"code": "US",
"number": 55,
"name_zh_cn": "美国",
"name_en": "United States",
"square_flag": "https://example.com/static/flags/us.png"
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 請求成功 | Inline |
返回數据結構
狀態碼 200
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功 | |
| » msg | string | false | none | 狀態消息 | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» code | string | false | none | 國家或地區代码,ISO 3166-1 alpha-2 | |
| »»» number | integer | false | none | 當前站点可用數據中心 IP 數量 | |
| »»» name_zh_cn | string | false | none | 國家或地區中文名称 | |
| »»» name_en | string | false | none | 國家或地區英文名称 | |
| »»» square_flag | string | false | none | 方形國旗图片 URL |
訂單管理
GET 訂單列表
GET /ep/order/list
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| page_no | query | integer | 否 | none |
| page_size | query | integer | 否 | none |
| trade_no | query | string | 否 | 訂單編號 |
| start_time | query | string(date-time) | 否 | 開始時間(包含),如 2024-01-01 00:00:00 |
| end_time | query | string(date-time) | 否 | 結束時間(不包含) |
| status | query | integer | 否 | 訂單狀態 |
| product_type | query | integer | 否 | 產品類型 |
| invoice | query | integer | 否 | 發票狀態:0不限制 1已開發票 -1未開發票(可补開) |
| pay_fee_status | query | integer | 否 | 長短款篩選:1超額支付 2短款支付 |
詳細說明
status: 訂單狀態
| 狀態 | 描述 |
|---|---|
| 0 | 待支付 |
| 1 | 已支付 |
| 2 | 超時未支付已取消 |
| 3 | 已退款 |
product_type: 產品類型
| 產品類型 | 描述 |
|---|---|
| 3 | 餘額充值 |
| 9 | 動態流量套餐 |
| 11 | 動態全球包时套餐V2 |
| 12 | 長效IDC流量套餐 |
| 13 | 住宅靜態IP流量套餐 |
| 14 | 數據中心靜態IP套餐 |
| 15 | 長效ISP流量套餐 |
| 16 | 靜態流量套餐 |
| 17 | 動態IP數量套餐 |
| 18 | web-scraper |
| 19 | 靜態IP續費 |
| 20 | 靜態IP更換配额 |
| 21 | 靜態流量套餐v2 |
| 24 | 靜態流量附加包套餐 |
| 25 | 住宅靜態IP套餐 |
| 26 | 補單 - 部分支付渠道需要使用者手动填寫金額,如:虛擬幣,若发生短款,需要联系客服通過此种产品進行補支付 |
| 27 | Serp |
| 28 | Video |
枚舉值
| 屬性 | 值 |
|---|---|
| status | 0 |
| status | 1 |
| status | 2 |
| status | 3 |
| product_type | 3 |
| product_type | 9 |
| product_type | 11 |
| product_type | 12 |
| product_type | 14 |
| product_type | 16 |
| product_type | 17 |
| product_type | 18 |
| product_type | 19 |
| product_type | 21 |
| product_type | 24 |
| product_type | 25 |
| product_type | 26 |
| product_type | 27 |
| product_type | 28 |
| invoice | -1 |
| invoice | 0 |
| invoice | 1 |
| pay_fee_status | 1 |
| pay_fee_status | 2 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"id": 0,
"trade_no": "string",
"out_trade_no": "string",
"product_id": 0,
"product_type": 0,
"amount": 0,
"unit_price": 0.1,
"total_fee": 0.1,
"goods_fee": 0.1,
"pay_fee": 0.1,
"discount_fee": 0.1,
"handling_fee": 0.1,
"refund_fee": 0.1,
"pm_id": 0,
"pm_title": "string",
"pm_logo": "string",
"status": 0,
"title": "string",
"detail": "string",
"region_desc": "string",
"pay_at": "2019-08-24T14:15:22Z",
"pay_timestamp": 0,
"created_at": "2019-08-24T14:15:22Z",
"pay_fee_status": 0,
"invoice": {}
}
],
"pagination": {
"total": 0,
"page_no": 0,
"page_size": 0,
"total_pages": 0
}
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回數据結構
POST 建立訂單
POST /ep/order/create
因套餐种类较多,且每种套餐存在不同的配置,請根據实际情况填寫參數。不正當填寫參數可能导致訂單建立失敗。
examples:
續費靜態IP
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"upids": "1,2,3,4,5,6", // 從 /ep/ip/get-static-ip 介面获取對應的 id 字段
"pm_id": 1 // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
}
靜態住宅IP購買
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID, // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
"region_list": "JP,15,333|DE,10,444|US,5,555" // 格式:地區,數量,ASN|地區,數量,ASN(ASN編號可選)
}
靜態數據中心IP購買
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID, // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
"region_list": "JP,15,333|DE,10,444|US,5,555" // 格式:地區,數量,ASN|地區,數量,ASN(ASN編號可選)
}
動態住宅流量購買
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
}
靜態轮换流量購買
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
}
動態無限流量購買
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID, // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
"product_sku_bandwidth_id": 頻寬規格ID,
"product_sku_concurrency_id": 併發規格ID
}
餘額充值
{
"pid": 套餐ID, // 從 /ep/product 介面获取
"pm_id": 支付方式ID, // 從 /ep/payment/list 或 /ep/payment/groups 介面获取
"recharge_amount": 充值金額
}
Body 請求參數
{
"pid": 0,
"upids": "string",
"amount": 0,
"pm_id": 0,
"region_list": "string",
"coupon_sn": "string",
"use_invitation_registration_discount": true,
"renew_duration": 0,
"product_sku_bandwidth_id": 0,
"product_sku_concurrency_id": 0,
"product_sku_duration_id": 0,
"etd": 1,
"recharge_amount": 0
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » pid | body | integer | 是 | 套餐ID,來自 /ep/product 介面返回的 id 字段 |
| » upids | body | string | 否 | 續費套餐ID列表(逗号分隔),來自 /ep/user-product/list 或 /ep/ip/get-static-ip 介面返回的 id 字段 |
| » amount | body | number | 否 | 新購套餐數量 |
| » pm_id | body | integer | 是 | 支付方式ID,來自 /ep/payment/list 或 /ep/payment/groups 介面返回的 id 字段 |
| » region_list | body | string | 否 | 購買靜態IP时指定區域+數量+ASN編號,格式:地區,數量,ASN |
| » coupon_sn | body | string | 否 | 優惠券編號 |
| » use_invitation_registration_discount | body | boolean | 否 | 是否使用邀請註冊優惠 |
| » renew_duration | body | integer | 否 | 續費時長-靜態IP可選 |
| » product_sku_bandwidth_id | body | integer | 否 | 套餐11:頻寬套餐ID |
| » product_sku_concurrency_id | body | integer | 否 | 套餐11:併發套餐ID |
| » product_sku_duration_id | body | integer | 否 | 套餐type=11必填:時長規格ID |
| » etd | body | integer | 否 | 時長倍數,從套餐 extension_of_time_days 获取,2代表天數×2,價格上浮 |
| » recharge_amount | body | integer | 否 | 套餐3:充值金額 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"id": 0,
"trade_no": "string",
"out_trade_no": "string",
"product_id": 0,
"product_type": 0,
"amount": 0,
"unit_price": 0.1,
"total_fee": 0.1,
"goods_fee": 0.1,
"pay_fee": 0.1,
"discount_fee": 0.1,
"handling_fee": 0.1,
"refund_fee": 0.1,
"pm_id": 0,
"pm_title": "string",
"pm_logo": "string",
"status": 0,
"title": "string",
"detail": "string",
"region_desc": "string",
"pay_at": "2019-08-24T14:15:22Z",
"pay_timestamp": 0,
"created_at": "2019-08-24T14:15:22Z",
"pay_fee_status": 0,
"invoice": {
"name": "string",
"org_name": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"email": "user@example.com",
"role_type": 0,
"vat_id": "string",
"address_country": "string",
"address_city": "string",
"address_line1": "string",
"address_line2": "string",
"address_postal_code": "string"
}
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 建立成功 | Inline |
返回數据結構
POST 取消訂單
POST /ep/order/close
Body 請求參數
{
"trade_no": "string"
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » trade_no | body | string | 是 | none |
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 操作成功 | None |
POST 訂單预检
POST /ep/order/check
建立訂單前调用,用于预览價格、折扣、IP續費明细等,不會实际建立訂單。 參數與 /ep/order/create 完全一致。
Body 請求參數
{
"pid": 0,
"upids": "string",
"amount": 1,
"pm_id": 0,
"region_list": "string",
"coupon_sn": "string",
"renew_duration": "1m",
"product_sku_bandwidth_id": 0,
"product_sku_concurrency_id": 0,
"product_sku_duration_id": 0,
"etd": 1,
"recharge_amount": 0
}
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » pid | body | integer | 是 | 套餐ID |
| » upids | body | string | 否 | IP續費:使用者套餐ID列表,逗号分隔 |
| » amount | body | integer | 否 | 購買數量 |
| » pm_id | body | integer | 是 | 支付方式ID |
| » region_list | body | string | 否 | 靜態IP購買地區+數量,格式:地區ID,數量 |
| » coupon_sn | body | string | 否 | 優惠券編號 |
| » renew_duration | body | string | 否 | IP續費時長:1m=1个月,2m=2个月,em=下个月月底 |
| » product_sku_bandwidth_id | body | integer | 否 | 套餐type=11必填:頻寬規格ID |
| » product_sku_concurrency_id | body | integer | 否 | 套餐type=11必填:併發規格ID |
| » product_sku_duration_id | body | integer | 否 | 套餐type=11必填:時長規格ID |
| » etd | body | integer | 否 | 時長倍數,從套餐 extension_of_time_days 获取 |
| » recharge_amount | body | number | 否 | 套餐type=3必填:充值金額 |
枚舉值
| 屬性 | 值 |
|---|---|
| » renew_duration | 1m |
| » renew_duration | 2m |
| » renew_duration | em |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"product_id": 0,
"amount": 0,
"discount_fee": 0.1,
"total_fee": 0.1,
"pay_fee": 0.1,
"product_type": 0,
"title": "string",
"detail": "string",
"ip_result": [
{
"ip": "string",
"price": 0.1,
"country_code": "string",
"current_time": "2019-08-24T14:15:22Z",
"renewal_time": "2019-08-24T14:15:22Z",
"country": {}
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 预检成功 | Inline |
返回數据結構
支付管理
GET 获取支付方式列表
GET /ep/payment/list
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| trade_no | query | string | 否 | 訂單號 - 部分訂單需要获取特定支付方式时可传入 |
| currency | query | string | 否 | 貨幣单位 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"id": 0,
"title": "string",
"logo": "string",
"group": "string",
"handling_rate": 0,
"handling_fee": 0,
"disabled": false,
"min": 0,
"max": 0
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | Inline |
返回數据結構
GET 获取支付方式列表
GET /ep/payment/groups
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| trade_no | query | string | 否 | 訂單號 - 部分訂單需要获取特定支付方式时可传入 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"name": "string",
"logos": [
null
],
"items": [
null
]
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | Inline |
返回數据結構
营销
GET 充值赠金比例
GET /ep/activity/balance-recharge-gift-ratio
充值赠金比例
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
null
]
}
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | OK | Inline |
返回數据結構
产品
GET 產品列表
GET /ep/product
获取當前站点可購買的套餐列表,支持按類型、有效期等条件篩選。
請求參數
| 名称 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| type | query | integer | 否 | 套餐類型,见 Product.type 枚举說明。不传则返回所有類型。 |
| parent_product_type | query | integer | 否 | 父套餐類型,仅 type=19(IP續費)时有效,用于篩選产品线:14=數據中心 25=住宅 |
| time_days | query | any | 否 | 有效期天數篩選,支持单值或陣列,如 30 / [30,90,365] |
| show_type | query | any | 否 | 展示類型篩選,支持单值或陣列 |
詳細說明
type: 套餐類型,见 Product.type 枚举說明。不传则返回所有類型。
枚舉值
| 屬性 | 值 |
|---|---|
| parent_product_type | 14 |
| parent_product_type | 25 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": [
{
"id": 0,
"title": "string",
"type": 0,
"show_type": 0,
"status": 0,
"price": 0.1,
"usd_price": 0.1,
"price_hkd": 0.1,
"original_price": 0.1,
"original_usd_price": 0.1,
"original_price_hkd": 0.1,
"local_price": 0.1,
"local_original_price": 0.1,
"preferred_currency": "string",
"support_currencies": "string",
"flow_value": 0.1,
"flow_give": 0.1,
"balance_give": 0.1,
"balance_value": 0.1,
"time_validity": 0.1,
"time_price": 0.1,
"time_days": 0,
"tip1": "string",
"tip2": "string",
"introduce": [
"string"
],
"region_list_id": 0,
"renew_product_list": "string",
"parent_product_type": 0,
"total_count": 0,
"remain_count": 0,
"extension_of_time_days": [
0
],
"time_days_price_rate": 0.1,
"desc": {
"subtitle": "string",
"flow_value": 0.1,
"flow_give": 0.1,
"balance_give": 0.1,
"time_validity": 0.1,
"time_price": 0.1,
"tip1": "string",
"tip2": "string",
"introduce": [
null
]
},
"sku": {
"bandwidth_list": [
null
],
"duration_list": [
null
],
"concurrency_list": [
null
]
}
}
]
}
返回結果
| 狀態碼 | 狀態碼含义 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | OK | Inline |
返回數据結構
數據模型
productTypes
9
套餐類型,9 動態住宅流量套餐、11 動態住宅IP、14靜態數據中心IP、25 靜態住宅IP
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| anonymous | integer | false | none | 套餐類型,9 動態住宅流量套餐、11 動態住宅IP、14靜態數據中心IP、25 靜態住宅IP |
枚舉值
| 屬性 | 值 |
|---|---|
| anonymous | 9 |
| anonymous | 11 |
| anonymous | 14 |
| anonymous | 25 |
responseCode
200
狀態碼,200 成功、3 app_key 無效
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| anonymous | integer | false | none | 狀態碼,200 成功、3 app_key 無效 |
SuccessResponse
{
"code": 0,
"message": "操作成功",
"data": {}
}
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| code | integer | false | none | none | |
| message | string | false | none | none | |
| data | object | false | none | none |
Order
{
"id": 0,
"trade_no": "string",
"out_trade_no": "string",
"product_id": 0,
"product_type": 0,
"amount": 0,
"unit_price": 0.1,
"total_fee": 0.1,
"goods_fee": 0.1,
"pay_fee": 0.1,
"discount_fee": 0.1,
"handling_fee": 0.1,
"refund_fee": 0.1,
"pm_id": 0,
"pm_title": "string",
"pm_logo": "string",
"status": 0,
"title": "string",
"detail": "string",
"region_desc": "string",
"pay_at": "2019-08-24T14:15:22Z",
"pay_timestamp": 0,
"created_at": "2019-08-24T14:15:22Z",
"pay_fee_status": 0,
"invoice": {
"name": "string",
"org_name": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"email": "user@example.com",
"role_type": 0,
"vat_id": "string",
"address_country": "string",
"address_city": "string",
"address_line1": "string",
"address_line2": "string",
"address_postal_code": "string"
}
}
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | 訂單ID | |
| trade_no | string | false | none | 内部訂單編號 | |
| out_trade_no | string | false | none | 外部訂單編號 | |
| product_id | integer | false | none | 套餐ID | |
| product_type | integer | false | none | 套餐類型,见產品類型枚举 | |
| amount | integer | false | none | 購買數量 | |
| unit_price | number(float) | false | none | 單價 | |
| total_fee | number(float) | false | none | 訂單總價(不含折扣,含手續費) | |
| goods_fee | number(float) | false | none | 商品價格(含折扣,不含手續費) | |
| pay_fee | number(float) | false | none | 實付金額(含折扣,含手續費) | |
| discount_fee | number(float) | false | none | 優惠金額 | |
| handling_fee | number(float) | false | none | 手續費 | |
| refund_fee | number(float) | false | none | 退款金額 | |
| pm_id | integer | false | none | 支付方式ID(來自 /ep/payment/list) | |
| pm_title | string | false | none | 支付方式名称 | |
| pm_logo | string | false | none | 支付方式Logo URL | |
| status | integer | false | none | 訂單狀態 | |
| title | string | false | none | 套餐標題 | |
| detail | string | false | none | 套餐描述 | |
| region_desc | string | false | none | 地區規格描述 | |
| pay_at | string(date-time) | false | none | 支付時間 | |
| pay_timestamp | integer | false | none | 支付時間戳 | |
| created_at | string(date-time) | false | none | 建立時間 | |
| pay_fee_status | integer | false | none | 長短款狀態:0正常 1長款(超額支付) 2短款 | |
| invoice | object | false | none | 發票資訊(仅线上支付訂單有值) | |
| » name | string | false | none | 全名 | |
| » org_name | string | false | none | 企業名稱 | |
| » first_name | string | false | none | none | |
| » last_name | string | false | none | none | |
| » phone | string | false | none | none | |
| string(email) | false | none | none | ||
| » role_type | integer | false | none | 1個人 2企業 | |
| » vat_id | string | false | none | 稅號 | |
| » address_country | string | false | none | none | |
| » address_city | string | false | none | none | |
| » address_line1 | string | false | none | none | |
| » address_line2 | string | false | none | none | |
| » address_postal_code | string | false | none | none |
OrderCheckResult
{
"product_id": 0,
"amount": 0,
"discount_fee": 0.1,
"total_fee": 0.1,
"pay_fee": 0.1,
"product_type": 0,
"title": "string",
"detail": "string",
"ip_result": [
{
"ip": "string",
"price": 0.1,
"country_code": "string",
"current_time": "2019-08-24T14:15:22Z",
"renewal_time": "2019-08-24T14:15:22Z",
"country": {
"name_zh_cn": "string",
"flag": "string",
"square_flag": "string"
}
}
]
}
訂單预检結果
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| product_id | integer | false | none | 套餐ID | |
| amount | integer | false | none | 數量 | |
| discount_fee | number(float) | false | none | 優惠金額 | |
| total_fee | number(float) | false | none | 訂單總额 | |
| pay_fee | number(float) | false | none | 實付金額 | |
| product_type | integer | false | none | 套餐類型 | |
| title | string | false | none | 套餐標題 | |
| detail | string | false | none | 套餐描述 | |
| ip_result | [object] | false | none | IP批量續費結果(仅IP續費时返回) | |
| » ip | string | false | none | none | |
| » price | number(float) | false | none | none | |
| » country_code | string | false | none | none | |
| » current_time | string(date-time) | false | none | none | |
| » renewal_time | string(date-time) | false | none | none | |
| » country | object | false | none | none | |
| »» name_zh_cn | string | false | none | none | |
| »» flag | string | false | none | 圆形旗帜URL | |
| »» square_flag | string | false | none | 方形旗幟URL |
Product
{
"id": 0,
"title": "string",
"type": 0,
"show_type": 0,
"status": 0,
"price": 0.1,
"usd_price": 0.1,
"price_hkd": 0.1,
"original_price": 0.1,
"original_usd_price": 0.1,
"original_price_hkd": 0.1,
"local_price": 0.1,
"local_original_price": 0.1,
"preferred_currency": "string",
"support_currencies": "string",
"flow_value": 0.1,
"flow_give": 0.1,
"balance_give": 0.1,
"balance_value": 0.1,
"time_validity": 0.1,
"time_price": 0.1,
"time_days": 0,
"tip1": "string",
"tip2": "string",
"introduce": [
"string"
],
"region_list_id": 0,
"renew_product_list": "string",
"parent_product_type": 0,
"total_count": 0,
"remain_count": 0,
"extension_of_time_days": [
0
],
"time_days_price_rate": 0.1,
"desc": {
"subtitle": "string",
"flow_value": 0.1,
"flow_give": 0.1,
"balance_give": 0.1,
"time_validity": 0.1,
"time_price": 0.1,
"tip1": "string",
"tip2": "string",
"introduce": [
"string"
]
},
"sku": {
"bandwidth_list": [
{
"id": 0,
"value": 0,
"price": 0.1,
"price_usd": 0.1,
"price_hkd": 0.1
}
],
"duration_list": [
{
"id": 0,
"value": 0,
"price": 0.1,
"price_usd": 0.1,
"price_hkd": 0.1
}
],
"concurrency_list": [
{
"id": 0,
"value": 0,
"price": 0.1,
"price_usd": 0.1,
"price_hkd": 0.1
}
]
}
}
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | 套餐ID | |
| title | string | false | none | 套餐主標題 | |
| type | integer | false | none | 套餐類型 | |
| show_type | integer | false | none | 展示類型:1普通 2大额推荐 3不可購買(需定制) 4试用 | |
| status | integer | false | none | 狀態:1上架 0下架 | |
| price | number(float) | false | none | 人民幣價格 | |
| usd_price | number(float) | false | none | 美元價格 | |
| price_hkd | number(float) | false | none | 港幣價格 | |
| original_price | number(float) | false | none | 原價(CNY) | |
| original_usd_price | number(float) | false | none | 原價(USD) | |
| original_price_hkd | number(float) | false | none | 原價(HKD) | |
| local_price | number(float) | false | none | 本地化價格(依赖 preferred_currency) | |
| local_original_price | number(float) | false | none | 本地化原價(依赖 preferred_currency) | |
| preferred_currency | string | false | none | 推荐显示貨幣,如 usd / cny / hkd | |
| support_currencies | string | false | none | 支持的貨幣列表,逗号分隔,如 usd,cny | |
| flow_value | number(float) | false | none | 流量套餐預設流量(GB) | |
| flow_give | number(float) | false | none | 贈送流量(GB) | |
| balance_give | number(float) | false | none | 餘額充值贈送金額 | |
| balance_value | number(float) | false | none | 充值金額 | |
| time_validity | number(float) | false | none | 包量套餐預設有效時長 | |
| time_price | number(float) | false | none | 包量套餐每IP價格 | |
| time_days | integer | false | none | 有效期天數,如 30/90/180/365 | |
| tip1 | string | false | none | 標籤說明1 | |
| tip2 | string | false | none | 標籤說明2 | |
| introduce | [string] | false | none | 文本介紹列表 | |
| region_list_id | integer | false | none | 地區ID | |
| renew_product_list | string | false | none | 可续订套餐ID列表(逗号分隔) | |
| parent_product_type | integer | false | none | 父套餐類型(type=19时有效):14或25 | |
| total_count | integer | false | none | 總庫存,0表示不限制 | |
| remain_count | integer | false | none | 剩餘庫存 | |
| extension_of_time_days | [integer] | false | none | 時長倍數列表,為空或仅含1表示不支持 | |
| time_days_price_rate | number(float) | false | none | 時長價格係數,價格 × (1 + (倍數-1) × rate) | |
| desc | object | false | none | 套餐描述信息 | |
| » subtitle | string | false | none | 副標題 | |
| » flow_value | number(float) | false | none | none | |
| » flow_give | number(float) | false | none | none | |
| » balance_give | number(float) | false | none | none | |
| » time_validity | number(float) | false | none | none | |
| » time_price | number(float) | false | none | none | |
| » tip1 | string | false | none | none | |
| » tip2 | string | false | none | none | |
| » introduce | [string] | false | none | none | |
| sku | object | false | none | 規格參數(type=11时返回) | |
| » bandwidth_list | [object] | false | none | 頻寬規格列表 | |
| »» id | integer | false | none | none | |
| »» value | integer | false | none | 頻寬值(Mbps) | |
| »» price | number(float) | false | none | none | |
| »» price_usd | number(float) | false | none | none | |
| »» price_hkd | number(float) | false | none | none | |
| » duration_list | [object] | false | none | 時長規格列表 | |
| »» id | integer | false | none | none | |
| »» value | integer | false | none | 時長(天) | |
| »» price | number(float) | false | none | none | |
| »» price_usd | number(float) | false | none | none | |
| »» price_hkd | number(float) | false | none | none | |
| » concurrency_list | [object] | false | none | 併發規格列表 | |
| »» id | integer | false | none | none | |
| »» value | integer | false | none | 併發數 | |
| »» price | number(float) | false | none | none | |
| »» price_usd | number(float) | false | none | none | |
| »» price_hkd | number(float) | false | none | none |
Pagination
{
"total": 0,
"page_no": 0,
"page_size": 0,
"total_pages": 0
}
屬性
| 名称 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| total | integer | false | none | none | |
| page_no | integer | false | none | none | |
| page_size | integer | false | none | none | |
| total_pages | integer | false | none | none |