911Proxy OpenAPI
app_key 認證金鑰請登入後在個人中心首頁查看。
請安全保存金鑰,金鑰擁有您的帳戶管理員權限。
Base URLs:
https://api.911proxy.com
認證方式
App Key 認證
POST 參數:
app_key: {your_app_key}
或作為查詢參數:
?app_key={your_app_key}
響應格式
所有介面返回統一的 JSON 格式:
{
"code": 200,
"message": "操作成功",
"data": {}
}
code: 狀態碼,200 表示成功,其他值表示失敗message: 響應訊息(中文)data: 響應資料
Authentication
本介面支援以下兩種鑑權方式:
1. Bearer Token(JWT)
透過 HTTP Header 傳遞 Token。
Header 範例:
Authorization: Bearer <your_jwt_token>
API Key 鑑權
本介面採用 API Key 方式進行身份驗證。
客戶端需要在請求中攜帶 app_key 參數,否則請求將被拒絕。
範例:
GET /api/example?app_key=your_app_key
POST /api/example?app_key=your_app_key
Content-Type: application/json
代理帳戶管理
GET 代理帳戶清單
GET /api-gate-way/whitelist-account/list
返回範例
成功響應(200)
{
"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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 |
流量日誌查詢
GET 使用流量按天彙總
GET /api-gate-way/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 /api-gate-way/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 /api-gate-way/user-product/summary
獲取用戶套餐的統計匯總信息,包括總量、有效量、臨期量、過期量等
請求參數
| 參數名 | 類型 | 必填 | 說明 |
|---|---|---|---|
| app_key | string(password) | 是 | 認證金鑰 |
| product_type | integer | 否 | 產品類型,僅支援:9(動態流量套餐)、12(長效IDC流量套餐) |
回傳結果
{
"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
| 欄位 | 類型 | 說明 |
|---|---|---|
| total | integer | 流量/IP 總量(單位:KB) |
| total_count | integer | 套餐總個數 |
| effective | integer | 有效剩餘量(單位:KB) |
| effective_count | integer | 有效套餐數 |
| effective_total | integer | 有效總量(單位:KB) |
| effective_used | integer | 有效已使用量(單位:KB) |
| temporary | integer | 臨期總量(7 天內到期,單位:KB) |
| temporary_count | integer | 臨期套餐個數(7 天內到期) |
| expired | integer | 過期剩餘量(單位:KB) |
| expired_count | integer | 過期套餐數 |
| used | integer | 已使用總量(單位:KB) |
IP 提取
GET 提取 IP
GET /api-gate-way/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 | 否 | 代理網路 |
返回範例
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 城市清單
GET /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 /api-gate-way/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 |
| status | 2 |
| status | 3 |
| status | 4 |
返回範例
200 Response
{}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回資料結構
GET 獲取在售地區靜態IP數量
GET /api-gate-way/static-ip-region
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| isp | query | string | 否 | IP類型 |
IP類型說明
| IP類型 | 描述 |
|---|---|
| 1 | 家庭住宅靜態IP |
| 0 | 資料中心靜態IP |
返回範例
200 Response
{
"code": 200,
"msg": "请求成功",
"data": {
"list": [
{
"code": "US",
"number": 55
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | none | 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 訂單清單
GET /api-gate-way/order/list
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| page_no | query | integer | 否 | none |
| page_size | query | integer | 否 | none |
| trade_no | query | string | 否 | 訂單編號 |
| status | query | integer | 否 | 訂單狀態 |
| product_type | query | integer | 否 | 產品類型 |
詳細說明
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 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"id": 0,
"trade_no": "string",
"product_id": 0,
"product_name": "string",
"total_fee": 0.1,
"pay_fee": 0.1,
"status": 0,
"created_at": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"total": 0,
"page_no": 0,
"page_size": 0,
"total_pages": 0
}
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回資料結構
POST 建立訂單
POST /api-gate-way/order/create
因套餐種類較多,且每種套餐存在不同的設定,請根據實際情況填寫參數。不正當填寫參數可能導致訂單建立失敗。
examples:
續費靜態IP
{
"pid": x, // 聯絡客服取得
"upids": "1,2,3,4,5,6", // 從 /api-gate-way/ip/get-static-ip 取得對應的ID
"pm_id": 1 // 從 /api-gate-way/payment/list 取得
"coupon_sn: "xxx", // 可選 優惠券
}
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,
"recharge_amount": 0
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » pid | body | integer | 是 | 套餐ID |
| » upids | body | string | 否 | 續費套餐ID清單 |
| » amount | body | number | 否 | 新購套餐數量 |
| » pm_id | body | integer | 是 | 支付方式ID |
| » region_list | body | string | 否 | 購買靜態IP時指定區域+數量 |
| » 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 |
| » recharge_amount | body | integer | 否 | 套餐3:儲值金額 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"id": 0,
"trade_no": "string",
"product_id": 0,
"product_name": "string",
"total_fee": 0.1,
"pay_fee": 0.1,
"status": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | 建立成功 | Inline |
返回資料結構
POST 取消訂單
POST /api-gate-way/order/close
Body 請求參數
{
"trade_no": "string"
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
| » trade_no | body | string | 是 | none |
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | 操作成功 | None |
使用者管理
GET 取得使用者資訊 - 暫未開放
GET /api-gate-way/user/info
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"id": 0,
"email": "[email protected]",
"phone": "string",
"balance": 0.1,
"status": 0,
"is_real_name": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回資料結構
支付管理
GET 取得支付方式清單
GET /api-gate-way/payment/groups
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| trade_no | query | string | 否 | 訂單號 - 部分訂單需要取得特定支付方式時可傳入 |
返回範例
200 Response
{
"code": 0,
"message": "操作成功",
"data": {
"list": [
{
"name": "支付方式分组",
"logos": ["https://example.com/logo1.png", "https://example.com/logo2.png"],
"items": [
{
"id": 1,
"title": "title1",
"logo": "https://example.com/logo1.png",
"group": "online",
"disabled": false,
"min": 10,
"max": 5000
}
]
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | 取得成功 | Inline |
返回資料結構
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未實名認證 | |
| » msg | string | false | none | 狀態訊息 | |
| » data | object | false | none | none | |
| »» name | string | false | none | 分組名稱 | |
| »» logos | string[] | false | none | 分組圖示清單 | |
| »» items | object[] | false | none | 分組內項目清單 | |
| »»» id | integer | false | none | 支付方式 ID | |
| »»» title | string | false | none | 支付方式名稱 | |
| »»» logo | string | false | none | 支付方式 Logo | |
| »»» group | string | false | none | 支付方式分組標識 | |
| »»» disabled | boolean | false | none | 是否停用(預設 false) | |
| »»» min | number | false | none | 最小金額 | |
| »»» max | number | false | none | 最大金額 |
行銷
GET 儲值贈金比例
GET /api-gate-way/activity/balance-recharge-gift-ratio
儲值贈金比例
返回範例
200 Response
{
"code": 0,
"msg": "操作成功",
"data": {
"list": [
{
"amount": 100,
"ratio": 1.2
}
]
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 資料模型 |
|---|---|---|---|
| 200 | OK | OK | Inline |
返回資料結構
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » code | integer | false | none | 狀態碼,200 成功、3 app_key 無效、156 帳戶未實名認證 | |
| » msg | string | false | none | 狀態訊息 | |
| » data | object | false | none | none | |
| » list | [object] | false | none | none | |
| »» amount | integer | false | none | 儲值金額 | |
| »» ratio | number | false | none | 儲值比例 |
資料結構說明(Schemas)
productTypes(套餐類型)
| 欄位 | 類型 | 說明 |
|---|---|---|
| product_type | integer | 套餐類型 |
可選值說明:
| 值 | 含義 |
|---|---|
| 9 | 動態住宅流量套餐 |
| 11 | 動態住宅 IP |
| 14 | 靜態資料中心 IP |
| 25 | 靜態住宅 IP |
API Key(認證金鑰)
用於介面身份認證,請透過 Query 參數傳遞。
| 參數名 | 位置 | 類型 | 必填 | 說明 |
|---|---|---|---|---|
| app_key | query | string | 是 | 認證金鑰 |
通用響應欄位
responseCode
| 欄位 | 類型 | 範例 | 說明 |
|---|---|---|---|
| code | integer | 200 | 狀態碼(200 成功,3 表示 app_key 無效) |
responseMsg
| 欄位 | 類型 | 範例 | 說明 |
|---|---|---|---|
| message | string | success | 響應資訊 |
成功響應(SuccessResponse)
{
"code": 0,
"message": "操作成功",
"data": {}
}
錯誤響應(ErrorResponse)
{
"code": 400,
"message": "參數錯誤",
"errors": {}
}
User
{
"id": 0,
"email": "[email protected]",
"phone": "string",
"balance": 0.1,
"status": 0,
"is_real_name": true,
"created_at": "2019-08-24T14:15:22Z"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| string(email) | false | none | none | ||
| phone | string | false | none | none | |
| balance | number(float) | false | none | none | |
| status | integer | false | none | none | |
| is_real_name | boolean | false | none | none | |
| created_at | string(date-time) | false | none | none |
Order
{
"id": 0,
"trade_no": "string",
"product_id": 0,
"product_name": "string",
"total_fee": 0.1,
"pay_fee": 0.1,
"status": 0,
"created_at": "2019-08-24T14:15:22Z"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| trade_no | string | false | none | none | |
| product_id | integer | false | none | none | |
| product_name | string | false | none | none | |
| total_fee | number(float) | false | none | none | |
| pay_fee | number(float) | false | none | none | |
| status | integer | false | none | none | |
| created_at | string(date-time) | false | none | none |
Product
{
"id": 0,
"name": "string",
"type": 0,
"price": 0.1,
"description": "string"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| name | string | false | none | none | |
| type | integer | false | none | none | |
| price | number(float) | false | none | none | |
| description | string | false | none | none |
WhiteIp
{
"id": 0,
"ip": "string",
"remark": "string",
"created_at": "2019-08-24T14:15:22Z"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| ip | string | false | none | none | |
| remark | string | false | none | none | |
| created_at | string(date-time) | false | none | none |
WhitelistAccount
{
"id": 0,
"username": "string",
"limit": 0,
"used": 0,
"status": 0
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| username | string | false | none | none | |
| limit | integer | false | none | none | |
| used | integer | false | none | none | |
| status | integer | false | none | none |
Coupon
{
"id": 0,
"name": "string",
"code": "string",
"discount": 0.1,
"expire_time": "2019-08-24T14:15:22Z"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| name | string | false | none | none | |
| code | string | false | none | none | |
| discount | number(float) | false | none | none | |
| expire_time | string(date-time) | false | none | none |
Article
{
"id": 0,
"title": "string",
"content": "string",
"created_at": "2019-08-24T14:15:22Z"
}
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| id | integer | false | none | none | |
| title | string | false | none | none | |
| content | string | false | none | none | |
| created_at | string(date-time) | 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 |