ProxyWing
浏览端点

ProxyWing 开发者 API

ISP

为 ISP 代理下单、列出、延期、更改密码以及将 IP 加入白名单。

GET /isp/products

列出 ISP 产品

返回所有位置可购买的 ISP 代理产品,以及其月度价格。

验证 · Bearer
请求 GET /isp/products
curl -X GET "https://api.proxywing.com/v1/isp/products" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "products": [
    {
      "product_id": "prod_368",
      "category": "isp",
      "group": "ISP US New York Premium",
      "name": "1 Proxy ISP US",
      "price_monthly": 3
    }
  ]
}
POST /isp/orders

订购 ISP 代理

使用账户余额购买 ISP 代理产品,支付后立即开通。仅接受 ISP 类别的产品(取自 GET /isp/products)。可选择 monthly、quarterly、semiannually 或 annually 作为 billing_cycle——周期越长,按产品每周期的折扣价计费(与网页结算的费率相同),total 字段会准确报告实际扣费金额。请提供 Idempotency-Key 请求头,这样重试绝不会重复扣费。此端点必须提供 Idempotency-Key——省略将返回 400,且不会产生任何扣费。

验证 · Bearer Idempotency-Key

请求体参数

  • product_id string 必填

    要订购的 ISP 产品,取自 GET /isp/products。

  • billing_cycle string 可选

    计费周期:"monthly"(默认)、"quarterly"、"semiannually" 或 "annually"。周期越长,按产品每周期的折扣价计费。(也接受月数 1/3/6/12 作为别名。)

  • promo_code string 可选

    可选的优惠码。通过 API 仅可使用折扣低于 100% 的百分比折扣优惠码(会使总额归零的优惠码将被拒绝)。

请求 POST /isp/orders
curl -X POST "https://api.proxywing.com/v1/isp/orders" \
  -H "Authorization: Bearer pk_live_XXXXXXXX" \
  -H "Idempotency-Key: b3f2a1c4-7e9d-4a2b-8c6f-1d5e9a0b3c7f" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"prod_368","billing_cycle":"quarterly"}'
响应 200 · application/json
{
  "order_id": "ord_100010",
  "invoice_id": "inv_200010",
  "product_id": "prod_368",
  "category": "isp",
  "billing_cycle": "quarterly",
  "total": 8.55,
  "status": "paid"
}
GET /isp/orders/{ord_id}/renewal-options

获取续费期限

返回 ISP 订单可用的延期期限——1、3、6 和 12 个月——及各自的价格(较长期限享有折扣)。请将其中一个 months 值作为 cycle 传入以延期。此处只能为按月计费的服务报价;非按月计费的服务目前会返回 500,而不是规范的 4xx。

验证 · Bearer

路径参数

  • ord_id string 必填

    ISP 订单 ID,可从 GET /isp/proxies 获取。

请求 GET /isp/orders/{ord_id}/renewal-options
curl -X GET "https://api.proxywing.com/v1/isp/orders/{ord_id}/renewal-options" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "order_id": "ord_100010",
  "next_due_date": "2026-09-02",
  "options": [
    {
      "months": 1,
      "total": 3,
      "label": "1 Month",
      "discount_pct": 0
    },
    {
      "months": 3,
      "total": 8.55,
      "label": "3 Months",
      "discount_pct": 5
    },
    {
      "months": 6,
      "total": 16.75,
      "label": "6 Months",
      "discount_pct": 7
    },
    {
      "months": 12,
      "total": 32.4,
      "label": "12 Months",
      "discount_pct": 10
    }
  ]
}
POST /isp/orders/{ord_id}/extend

续期 ISP 订单

将 ISP 订单续期 1、3、6 或 12 个月,并从账户余额中结清账单。周期越长,按产品每周期的折扣价计费(参见 GET /isp/orders/{ord_id}/renewal-options)。请提供 Idempotency-Key 请求头,这样重试绝不会重复续期。Idempotency-Key 为必填项——省略将在产生任何扣费之前返回 400。只有按月计费周期的服务才能通过 API 续期,且服务必须处于活跃或已暂停状态;其他情况均会被拒绝。按季度、半年或年度周期订购的服务无法在此续期。

验证 · Bearer Idempotency-Key

路径参数

  • ord_id string 必填

    要续期的 ISP 订单 ID。

请求体参数

  • cycle integer 必填

    续期时长(以月为单位):1、3、6 或 12。

  • cycle_type string 必填

    必须为 "monthly"。

请求 POST /isp/orders/{ord_id}/extend
curl -X POST "https://api.proxywing.com/v1/isp/orders/{ord_id}/extend" \
  -H "Authorization: Bearer pk_live_XXXXXXXX" \
  -H "Idempotency-Key: b3f2a1c4-7e9d-4a2b-8c6f-1d5e9a0b3c7f" \
  -H "Content-Type: application/json" \
  -d '{"cycle":3,"cycle_type":"monthly"}'
响应 200 · application/json
{
  "order_id": "ord_100010",
  "invoice_id": "inv_200012",
  "status": "paid",
  "total": 8.55,
  "next_due_date": "2026-12-02"
}
GET /isp/proxies

列出 ISP 代理

返回账户中所有有效的 ISP 订单,以及其当前有效的代理凭据。每个订单的 id 是稳定的:同一订单每次调用都返回相同的 ord_...,且始终可以解析,因此您可以将其保存。列表顺序不保证——请按 ID 匹配,而不是按位置。

验证 · Bearer
请求 GET /isp/proxies
curl -X GET "https://api.proxywing.com/v1/isp/proxies" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "orders": [
    {
      "id": "ord_100010",
      "location": "US",
      "status": "active",
      "expires_at": "2026-08-02T00:00:00+00:00",
      "proxies": [
        {
          "id": "prx_9Km2Wq4Xv1Pb7Ra0Uc8d",
          "ip": "203.0.113.20",
          "http_port": 8080,
          "socks_port": 1080,
          "username": "ISPSAMPLE",
          "password": "sample_password",
          "location": "US",
          "expires_at": "2026-08-02T00:00:00+00:00"
        }
      ]
    }
  ]
}
POST /isp/orders/{ord_id}/change-password

更改 ISP 代理密码

轮换 ISP 订单中所有代理的身份验证密码。使用旧密码的会话将立即失效。

验证 · Bearer

路径参数

  • ord_id string 必填

    ISP 订单 ID,可从 GET /isp/proxies 获取。

请求 POST /isp/orders/{ord_id}/change-password
curl -X POST "https://api.proxywing.com/v1/isp/orders/{ord_id}/change-password" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "status": "password_changed"
}
GET /isp/orders/{ord_id}/whitelist

列出白名单 IP

返回当前在 ISP 订单白名单中的 IP(无需用户名/密码即可使用代理的 IP)。

验证 · Bearer

路径参数

  • ord_id string 必填

    订单 ID,可从 GET /isp/proxies 获取。

请求 GET /isp/orders/{ord_id}/whitelist
curl -X GET "https://api.proxywing.com/v1/isp/orders/{ord_id}/whitelist" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "order_id": "ord_100010",
  "ips": [
    "203.0.113.9"
  ]
}
POST /isp/orders/{ord_id}/whitelist

将 IP 加入白名单

将 IP 地址添加到 ISP 订单的白名单,以便通过 IP 身份验证进行访问。

验证 · Bearer

路径参数

  • ord_id string 必填

    要在其上将 IP 加入白名单的 ISP 订单 ID。

请求体参数

  • ip string 必填

    要加入白名单的 IPv4 或 IPv6 地址,例如 203.0.113.9。

请求 POST /isp/orders/{ord_id}/whitelist
curl -X POST "https://api.proxywing.com/v1/isp/orders/{ord_id}/whitelist" \
  -H "Authorization: Bearer pk_live_XXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"ip":"203.0.113.9"}'
响应 200 · application/json
{
  "status": "whitelisted",
  "ip": "203.0.113.9"
}
DELETE /isp/orders/{ord_id}/whitelist/{ip}

移除白名单 IP

从 ISP 订单的白名单中移除一个 IP,并返回更新后的白名单。该操作是幂等的——移除不在白名单中的 IP 仍会返回 200,因此超时后重试是安全的。当该条目已从我们的记录中移除、但代理尚未应用此更改时,返回 503 whitelist_sync_pending;在应用之前,该 IP 仍可能被接受,因此请重试以确认。

验证 · Bearer

路径参数

  • ord_id string 必填

    ISP 订单 ID,可从 GET /isp/proxies 获取。

  • ip string 必填

    要移除的白名单 IP,例如 203.0.113.9。

请求 DELETE /isp/orders/{ord_id}/whitelist/{ip}
curl -X DELETE "https://api.proxywing.com/v1/isp/orders/{ord_id}/whitelist/{ip}" \
  -H "Authorization: Bearer pk_live_XXXXXXXX"
响应 200 · application/json
{
  "order_id": "ord_100001",
  "ips": [
    "203.0.113.10"
  ]
}