{
  "openapi": "3.1.0",
  "info": {
    "title": "只只HTTP 静态 API",
    "version": "1.0.0",
    "description": "账户统一 API 令牌通过唯一 api_key 查询参数认证，无需权限勾选。开放状态以控制台为准。采购及操作以账户、类型、业务编号幂等。Webhook 使用独立通知 Secret 验签。"
  },
  "servers": [
    {
      "url": "https://api.zzhttp.com/openapi/v1/static",
      "description": "生产环境静态住宅公开 API"
    }
  ],
  "security": [
    {
      "AccountAPIKey": []
    }
  ],
  "paths": {
    "/balance": {
      "get": {
        "operationId": "get__balance",
        "summary": "查询账户余额",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Balance",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "rechargeBalanceCents": 10000,
                        "giftBalanceCents": 2000,
                        "frozenAmountCents": 0,
                        "purchasableAmountCents": 12000,
                        "currency": "CNY"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-balance",
        "tags": [
          "账户"
        ],
        "description": "查询账户余额。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/balance?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/offers": {
      "get": {
        "operationId": "get__offers",
        "summary": "查询客户商品和库存快照",
        "parameters": [
          {
            "in": "query",
            "name": "countryCode",
            "schema": {
              "type": "string"
            },
            "description": "国家三字码，例如 USA；使用国家目录返回值。",
            "example": "USA"
          },
          {
            "in": "query",
            "name": "cityCode",
            "schema": {
              "type": "string"
            },
            "description": "城市编码，使用城市目录返回值。",
            "example": "NYC"
          },
          {
            "in": "query",
            "name": "ispType",
            "schema": {
              "type": "integer",
              "enum": [
                1,
                2
              ]
            },
            "description": "IP 类型：1 原生IP，2 独享IP；与控制台销售类型一致。",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Offers",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "offerId": 17,
                            "ispType": 1,
                            "countryCode": "USA",
                            "cityCode": "NYC",
                            "durationDays": 30,
                            "unitPriceCents": 3500,
                            "currency": "CNY",
                            "pricingSource": "retail",
                            "availableCount": 100,
                            "inventorySyncedAt": "2026-10-06T08:00:00Z",
                            "purchasable": false,
                            "capabilities": {
                              "purchase": {
                                "minDays": 30,
                                "maxDays": 360,
                                "stepDays": 30
                              },
                              "renew": {
                                "allowedDays": [
                                  30
                                ]
                              },
                              "convertTrial": {},
                              "trialDays": 0,
                              "changeIp": false,
                              "selectReplacement": false,
                              "customCredentials": true,
                              "randomCredentials": true,
                              "maxBatchSize": 100
                            }
                          }
                        ],
                        "inventorySyncedAt": "2026-10-06T08:00:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-offers",
        "tags": [
          "静态 IP"
        ],
        "description": "查询客户商品和库存快照。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/offers?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/quotes": {
      "post": {
        "operationId": "post__quotes",
        "summary": "报价不冻结资金或库存",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Quote",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "kind": "purchase",
                        "currency": "CNY",
                        "items": [
                          {
                            "offerId": 17,
                            "instanceId": 101,
                            "quantity": 1,
                            "durationDays": 30,
                            "unitPriceCents": 3500,
                            "amountCents": 3500,
                            "pricingSource": "retail"
                          }
                        ],
                        "totalAmountCents": 3500,
                        "quotedAt": "2026-10-06T08:00:00Z",
                        "inventoryReserved": false
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteInput"
              },
              "examples": {
                "variant1": {
                  "summary": "purchase",
                  "value": {
                    "kind": "purchase",
                    "items": [
                      {
                        "offerId": 17,
                        "quantity": 1,
                        "durationDays": 30
                      }
                    ]
                  }
                },
                "variant2": {
                  "summary": "renew",
                  "value": {
                    "kind": "renew",
                    "instanceIds": [
                      101
                    ],
                    "durationDays": 30
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-quotes",
        "tags": [
          "静态 IP"
        ],
        "description": "报价不冻结资金或库存。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/quotes?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"kind\":\"purchase\",\"items\":[{\"offerId\":17,\"quantity\":1,\"durationDays\":30}]}'"
          }
        ]
      }
    },
    "/orders": {
      "post": {
        "operationId": "post__orders",
        "summary": "购买静态 IP",
        "parameters": [],
        "responses": {
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "正常处理的成功或业务失败；读取 code、data.status 和逐项原因判断结果。",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "const": 200,
                          "description": "请求成功或已受理；以 data.status 判断交付结果。"
                        },
                        "message": {
                          "type": "string",
                          "description": "服务端结果说明。"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                        },
                        "data": {
                          "$ref": "#/components/schemas/Order",
                          "description": "本接口业务数据。"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "requestId",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "$ref": "#/components/schemas/PurchaseError"
                    }
                  ]
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "orderNo": "STATIC-DEMO-001",
                        "clientOrderNo": "platform-order-001",
                        "kind": "purchase",
                        "status": "accepted",
                        "totalAmountCents": 3500,
                        "currency": "CNY",
                        "settlement": {
                          "fundingSource": "wallet",
                          "reservedAmountCents": 3500,
                          "frozenAmountCents": 3500,
                          "capturedAmountCents": 0,
                          "releasedAmountCents": 0,
                          "gift": {
                            "reservedAmountCents": 0,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          },
                          "recharge": {
                            "reservedAmountCents": 3500,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          }
                        },
                        "items": [
                          {
                            "itemId": 201,
                            "offerId": 17,
                            "status": "accepted",
                            "requestedQuantity": 1,
                            "deliveredQuantity": 0,
                            "durationDays": 30,
                            "unitPriceCents": 3500,
                            "totalAmountCents": 3500,
                            "pricingSource": "retail",
                            "frozenAmountCents": 3500,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0,
                            "instanceIds": [],
                            "errorCode": "",
                            "errorMessage": "",
                            "nextAction": ""
                          }
                        ],
                        "createdAt": "2026-10-06T08:00:00Z",
                        "completedAt": null,
                        "queryUrl": "/openapi/v1/static/orders/STATIC-DEMO-001",
                        "source": "api"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderInput"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "clientOrderNo": "platform-order-001",
                    "items": [
                      {
                        "offerId": 17,
                        "quantity": 1,
                        "durationDays": 30
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-create-order",
        "tags": [
          "静态 IP"
        ],
        "description": "购买静态 IP，可通过 items[].durationDays 选择购买时长，默认30天。可购买时长以商品信息为准，金额以下单结果为准。",
        "x-retry-notes": "HTTP 200 / code 200 仅表示受理。超时或 500 先按原 clientOrderNo/clientOperationNo 查询；不要更换编号重复交易。同编号不同参数为 200 / 10705。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/orders?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"clientOrderNo\":\"platform-order-001\",\"items\":[{\"offerId\":17,\"quantity\":1,\"durationDays\":30}]}'"
          }
        ]
      },
      "get": {
        "operationId": "get__orders",
        "summary": "按客户订单编号查询订单",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "页码，从 1 开始，默认 1。",
            "example": 1
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "每页数量，默认 20；最大值见字段限制。",
            "example": 20
          },
          {
            "in": "query",
            "name": "clientOrderNo",
            "schema": {
              "type": "string"
            },
            "description": "客户订单编号，1–64 位字母、数字、_、.、-；同一账户重复提交相同编号和参数时返回原结果。",
            "example": "platform-order-001"
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string",
              "enum": [
                "console",
                "admin",
                "api"
              ]
            },
            "description": "订单来源：console 控制台、admin 后台、api 公开 API。",
            "example": "console"
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/OrderPage",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "orderNo": "STATIC-DEMO-001",
                            "clientOrderNo": "platform-order-001",
                            "kind": "purchase",
                            "status": "succeeded",
                            "totalAmountCents": 3500,
                            "currency": "CNY",
                            "settlement": {
                              "fundingSource": "wallet",
                              "reservedAmountCents": 3500,
                              "frozenAmountCents": 0,
                              "capturedAmountCents": 3500,
                              "releasedAmountCents": 0,
                              "gift": {
                                "reservedAmountCents": 0,
                                "capturedAmountCents": 0,
                                "releasedAmountCents": 0
                              },
                              "recharge": {
                                "reservedAmountCents": 3500,
                                "capturedAmountCents": 3500,
                                "releasedAmountCents": 0
                              }
                            },
                            "items": [
                              {
                                "itemId": 201,
                                "offerId": 17,
                                "status": "succeeded",
                                "requestedQuantity": 1,
                                "deliveredQuantity": 1,
                                "durationDays": 30,
                                "unitPriceCents": 3500,
                                "totalAmountCents": 3500,
                                "pricingSource": "retail",
                                "frozenAmountCents": 0,
                                "capturedAmountCents": 3500,
                                "releasedAmountCents": 0,
                                "instanceIds": [
                                  101
                                ],
                                "errorCode": "",
                                "errorMessage": "",
                                "nextAction": ""
                              }
                            ],
                            "createdAt": "2026-10-06T08:00:00Z",
                            "completedAt": "2026-10-06T08:00:00Z",
                            "queryUrl": "/openapi/v1/static/orders/STATIC-DEMO-001",
                            "source": "api"
                          }
                        ],
                        "page": 1,
                        "pageSize": 20,
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-orders",
        "tags": [
          "静态 IP"
        ],
        "description": "按客户订单编号查询订单。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/orders?api_key=${STATIC_API_KEY}&page=1&pageSize=20\""
          }
        ]
      }
    },
    "/orders/{orderNo}": {
      "get": {
        "operationId": "get__orders_orderNo",
        "summary": "查询订单和逐项结算",
        "parameters": [
          {
            "in": "path",
            "name": "orderNo",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "平台订单号；查询筛选时精确匹配本人订单。",
            "example": "STATIC-DEMO-001"
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Order",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "orderNo": "STATIC-DEMO-001",
                        "clientOrderNo": "platform-order-001",
                        "kind": "purchase",
                        "status": "succeeded",
                        "totalAmountCents": 3500,
                        "currency": "CNY",
                        "settlement": {
                          "fundingSource": "wallet",
                          "reservedAmountCents": 3500,
                          "frozenAmountCents": 0,
                          "capturedAmountCents": 3500,
                          "releasedAmountCents": 0,
                          "gift": {
                            "reservedAmountCents": 0,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          },
                          "recharge": {
                            "reservedAmountCents": 3500,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0
                          }
                        },
                        "items": [
                          {
                            "itemId": 201,
                            "offerId": 17,
                            "status": "succeeded",
                            "requestedQuantity": 1,
                            "deliveredQuantity": 1,
                            "durationDays": 30,
                            "unitPriceCents": 3500,
                            "totalAmountCents": 3500,
                            "pricingSource": "retail",
                            "frozenAmountCents": 0,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0,
                            "instanceIds": [
                              101
                            ],
                            "errorCode": "",
                            "errorMessage": "",
                            "nextAction": ""
                          }
                        ],
                        "createdAt": "2026-10-06T08:00:00Z",
                        "completedAt": "2026-10-06T08:00:00Z",
                        "queryUrl": "/openapi/v1/static/orders/STATIC-DEMO-001",
                        "source": "api"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-order-detail",
        "tags": [
          "静态 IP"
        ],
        "description": "查询订单和逐项结算。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/orders/STATIC-DEMO-001?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/instances": {
      "get": {
        "operationId": "get__instances",
        "summary": "查询账户实例",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "页码，从 1 开始，默认 1。",
            "example": 1
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 20
            },
            "description": "每页数量，默认 20；最大值见字段限制。",
            "example": 20
          },
          {
            "in": "query",
            "name": "countryCode",
            "schema": {
              "type": "string"
            },
            "description": "国家三字码，例如 USA；使用国家目录返回值。",
            "example": "USA"
          },
          {
            "in": "query",
            "name": "cityCode",
            "schema": {
              "type": "string"
            },
            "description": "城市编码，使用城市目录返回值。",
            "example": "NYC"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            },
            "description": "实例状态精确筛选：provisioning 交付中、active 有效、expired 已到期、cancelled 已取消、failed 失败。",
            "example": "succeeded"
          },
          {
            "in": "query",
            "name": "orderNo",
            "schema": {
              "type": "string"
            },
            "description": "平台订单号；查询筛选时精确匹配本人订单。",
            "example": "STATIC-DEMO-001"
          },
          {
            "name": "ip",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "单 IP 地址片段模糊匹配，与批量 POST 模式互斥。",
            "example": "203.0.113.10"
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "省略为全部，0 为未分组，正整数为本人分组。",
            "example": 12
          },
          {
            "name": "ip",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "单 IP 地址片段模糊匹配，与批量 POST 模式互斥。",
            "example": "203.0.113.10"
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "省略为全部，0 为未分组，正整数为本人分组。",
            "example": 12
          },
          {
            "name": "ip",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "单 IP 地址片段模糊匹配，与批量 POST 模式互斥。",
            "example": "203.0.113.10"
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "省略为全部，0 为未分组，正整数为本人分组。",
            "example": 12
          },
          {
            "name": "activatedFrom",
            "in": "query",
            "required": false,
            "description": "开通时间下界，含边界；含时区 RFC3339，可单独指定。",
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "开通时间下界，含边界；含时区 RFC3339，可单独指定。",
              "example": "2026-08-07T00:00:00+08:00"
            }
          },
          {
            "name": "activatedTo",
            "in": "query",
            "required": false,
            "description": "开通时间上界，含边界；含时区 RFC3339，可单独指定，不能早于下界。",
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "开通时间上界，含边界；含时区 RFC3339，可单独指定，不能早于下界。",
              "example": "2026-08-07T23:59:59.999+08:00"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/InstancePage",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "instanceId": 101,
                            "offerId": 17,
                            "status": "active",
                            "ip": "203.0.113.10",
                            "port": 9000,
                            "protocols": [
                              "http",
                              "socks5"
                            ],
                            "countryCode": "USA",
                            "cityCode": "NYC",
                            "ispType": 1,
                            "expiresAt": "2026-11-05T08:00:00Z",
                            "activatedAt": "2026-10-06T08:00:00Z",
                            "capabilities": {
                              "purchase": {
                                "minDays": 30,
                                "maxDays": 360,
                                "stepDays": 30
                              },
                              "renew": {
                                "allowedDays": [
                                  30
                                ]
                              },
                              "convertTrial": {},
                              "trialDays": 0,
                              "changeIp": false,
                              "selectReplacement": false,
                              "customCredentials": true,
                              "randomCredentials": true,
                              "maxBatchSize": 100
                            },
                            "groupId": null
                          }
                        ],
                        "page": 1,
                        "pageSize": 20,
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-instances",
        "tags": [
          "静态 IP"
        ],
        "description": "本人实例查询，所有筛选条件取交集。单 IP 采用地址片段；批量完整地址使用 POST 搜索。列表及详情不含密码，未分组 groupId 为 null。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances?api_key=${STATIC_API_KEY}&page=1&pageSize=20\""
          }
        ]
      }
    },
    "/instances/{instanceId}": {
      "get": {
        "operationId": "get__instances_instanceId",
        "summary": "查询实例",
        "parameters": [
          {
            "in": "path",
            "name": "instanceId",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "description": "实例 ID，属于当前账户；分组绑定此 ID。",
            "example": 101
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Instance",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "instanceId": 101,
                        "offerId": 17,
                        "status": "active",
                        "ip": "203.0.113.10",
                        "port": 9000,
                        "protocols": [
                          "http",
                          "socks5"
                        ],
                        "countryCode": "USA",
                        "cityCode": "NYC",
                        "ispType": 1,
                        "expiresAt": "2026-10-06T08:00:00Z",
                        "activatedAt": "2026-10-06T08:00:00Z",
                        "capabilities": {
                          "purchase": {
                            "minDays": 30,
                            "maxDays": 360,
                            "stepDays": 30
                          },
                          "renew": {
                            "allowedDays": [
                              30
                            ]
                          },
                          "convertTrial": {},
                          "trialDays": 0,
                          "changeIp": false,
                          "selectReplacement": false,
                          "customCredentials": true,
                          "randomCredentials": true,
                          "maxBatchSize": 100
                        },
                        "groupId": null
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-instance-detail",
        "tags": [
          "静态 IP"
        ],
        "description": "查询实例。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/101?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/instances/credentials": {
      "post": {
        "operationId": "post__instances_credentials",
        "summary": "读取实际节点凭据，禁止缓存和日志",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Credentials",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "instanceId": 101,
                            "ip": "203.0.113.10",
                            "port": 9000,
                            "protocols": "http,socks5",
                            "username": "example_user",
                            "password": "REPLACE_WITH_INSTANCE_PASSWORD"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceIDs"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "instanceIds": [
                      101
                    ]
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-credentials",
        "tags": [
          "静态 IP"
        ],
        "description": "读取实际节点凭据，禁止缓存和日志。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/credentials?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"instanceIds\":[101]}'"
          }
        ]
      }
    },
    "/instances/renew": {
      "post": {
        "operationId": "post__instances_renew",
        "summary": "受理批量续费",
        "parameters": [],
        "responses": {
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "异步受理，请查询最终状态",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Operation",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "operationId": 301,
                        "clientOperationNo": "platform-renew-001",
                        "type": "renewal",
                        "status": "accepted",
                        "totalAmountCents": 3500,
                        "currency": "CNY",
                        "settlement": {
                          "fundingSource": "wallet",
                          "reservedAmountCents": 3500,
                          "frozenAmountCents": 3500,
                          "capturedAmountCents": 0,
                          "releasedAmountCents": 0,
                          "gift": {
                            "reservedAmountCents": 0,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          },
                          "recharge": {
                            "reservedAmountCents": 3500,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          }
                        },
                        "items": [
                          {
                            "instanceId": 101,
                            "status": "accepted",
                            "amountCents": 3500,
                            "frozenAmountCents": 3500,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0,
                            "errorCode": "",
                            "completedAt": null,
                            "errorMessage": "",
                            "nextAction": ""
                          }
                        ],
                        "createdAt": "2026-10-06T08:00:00Z",
                        "completedAt": null,
                        "queryUrl": "/openapi/v1/static/operations/301",
                        "orderNo": "STATIC-RENEW-DEMO-001"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenewInput"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "clientOperationNo": "platform-renew-001",
                    "instanceIds": [
                      101
                    ],
                    "durationDays": 30,
                    "expectedTotalAmountCents": 3500
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-renew",
        "tags": [
          "静态 IP"
        ],
        "description": "受理批量续费。仅访问当前令牌账户的数据。",
        "x-retry-notes": "HTTP 200 / code 200 仅表示受理。超时或 500 先按原 clientOrderNo/clientOperationNo 查询；不要更换编号重复交易。同编号不同参数为 200 / 10705。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/renew?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"clientOperationNo\":\"platform-renew-001\",\"instanceIds\":[101],\"durationDays\":30,\"expectedTotalAmountCents\":3500}'"
          }
        ]
      }
    },
    "/instances/update-credentials": {
      "post": {
        "operationId": "post__instances_update-credentials",
        "summary": "受理批量改密",
        "parameters": [],
        "responses": {
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "同步改密结果；需检查逐项状态，未知结果使用原业务编号查询或重试",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Operation",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "operationId": 301,
                        "clientOperationNo": "platform-renew-001",
                        "type": "renewal",
                        "status": "succeeded",
                        "totalAmountCents": 3500,
                        "currency": "CNY",
                        "settlement": {
                          "fundingSource": "wallet",
                          "reservedAmountCents": 3500,
                          "frozenAmountCents": 0,
                          "capturedAmountCents": 3500,
                          "releasedAmountCents": 0,
                          "gift": {
                            "reservedAmountCents": 0,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          },
                          "recharge": {
                            "reservedAmountCents": 3500,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0
                          }
                        },
                        "items": [
                          {
                            "instanceId": 101,
                            "status": "succeeded",
                            "amountCents": 3500,
                            "frozenAmountCents": 0,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0,
                            "errorCode": "",
                            "completedAt": "2026-10-06T08:00:00Z",
                            "errorMessage": "",
                            "nextAction": ""
                          }
                        ],
                        "createdAt": "2026-10-06T08:00:00Z",
                        "completedAt": "2026-10-06T08:00:00Z",
                        "queryUrl": "/openapi/v1/static/operations/301",
                        "orderNo": "STATIC-RENEW-DEMO-001"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialUpdateInput"
              },
              "examples": {
                "variant1": {
                  "summary": "随机凭据",
                  "value": {
                    "clientOperationNo": "platform-renew-001",
                    "instanceIds": [
                      101
                    ],
                    "randomize": true
                  }
                },
                "variant2": {
                  "summary": "自定义凭据",
                  "value": {
                    "clientOperationNo": "platform-renew-001",
                    "instanceIds": [
                      101
                    ],
                    "randomize": false,
                    "username": "example_user",
                    "password": "REPLACE_WITH_INSTANCE_PASSWORD"
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-update-credentials",
        "tags": [
          "静态 IP"
        ],
        "description": "受理批量改密。仅访问当前令牌账户的数据。",
        "x-retry-notes": "HTTP 200 / code 200 仅表示受理。超时或 500 先按原 clientOrderNo/clientOperationNo 查询；不要更换编号重复交易。同编号不同参数为 200 / 10705。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/update-credentials?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"clientOperationNo\":\"platform-renew-001\",\"instanceIds\":[101],\"randomize\":true}'"
          }
        ]
      }
    },
    "/operations": {
      "get": {
        "operationId": "get__operations",
        "summary": "按客户操作编号查询操作",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "页码，从 1 开始，默认 1。",
            "example": 1
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "每页数量，默认 20；最大值见字段限制。",
            "example": 20
          },
          {
            "in": "query",
            "name": "clientOperationNo",
            "schema": {
              "type": "string"
            },
            "description": "客户操作编号，1–64 位字母、数字、_、.、-；同编号不同参数返回 HTTP 200 / 业务码 10705。",
            "example": "platform-renew-001"
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            },
            "description": "操作/事件类型。",
            "example": "renewal"
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/OperationPage",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "operationId": 301,
                            "clientOperationNo": "platform-renew-001",
                            "type": "renewal",
                            "status": "succeeded",
                            "totalAmountCents": 3500,
                            "currency": "CNY",
                            "settlement": {
                              "fundingSource": "wallet",
                              "reservedAmountCents": 3500,
                              "frozenAmountCents": 0,
                              "capturedAmountCents": 3500,
                              "releasedAmountCents": 0,
                              "gift": {
                                "reservedAmountCents": 0,
                                "capturedAmountCents": 0,
                                "releasedAmountCents": 0
                              },
                              "recharge": {
                                "reservedAmountCents": 3500,
                                "capturedAmountCents": 3500,
                                "releasedAmountCents": 0
                              }
                            },
                            "items": [
                              {
                                "instanceId": 101,
                                "status": "succeeded",
                                "amountCents": 3500,
                                "frozenAmountCents": 0,
                                "capturedAmountCents": 3500,
                                "releasedAmountCents": 0,
                                "errorCode": "",
                                "completedAt": "2026-10-06T08:00:00Z",
                                "errorMessage": "",
                                "nextAction": ""
                              }
                            ],
                            "createdAt": "2026-10-06T08:00:00Z",
                            "completedAt": "2026-10-06T08:00:00Z",
                            "queryUrl": "/openapi/v1/static/operations/301",
                            "orderNo": "STATIC-RENEW-DEMO-001"
                          }
                        ],
                        "page": 1,
                        "pageSize": 20,
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-operations",
        "tags": [
          "静态 IP"
        ],
        "description": "按客户操作编号查询操作。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/operations?api_key=${STATIC_API_KEY}&page=1&pageSize=20\""
          }
        ]
      }
    },
    "/operations/{operationId}": {
      "get": {
        "operationId": "get__operations_operationId",
        "summary": "查询逐实例操作结果",
        "parameters": [
          {
            "in": "path",
            "name": "operationId",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "description": "平台操作 ID。",
            "example": 301
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Operation",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "operationId": 301,
                        "clientOperationNo": "platform-renew-001",
                        "type": "renewal",
                        "status": "succeeded",
                        "totalAmountCents": 3500,
                        "currency": "CNY",
                        "settlement": {
                          "fundingSource": "wallet",
                          "reservedAmountCents": 3500,
                          "frozenAmountCents": 0,
                          "capturedAmountCents": 3500,
                          "releasedAmountCents": 0,
                          "gift": {
                            "reservedAmountCents": 0,
                            "capturedAmountCents": 0,
                            "releasedAmountCents": 0
                          },
                          "recharge": {
                            "reservedAmountCents": 3500,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0
                          }
                        },
                        "items": [
                          {
                            "instanceId": 101,
                            "status": "succeeded",
                            "amountCents": 3500,
                            "frozenAmountCents": 0,
                            "capturedAmountCents": 3500,
                            "releasedAmountCents": 0,
                            "errorCode": "",
                            "completedAt": "2026-10-06T08:00:00Z",
                            "errorMessage": "",
                            "nextAction": ""
                          }
                        ],
                        "createdAt": "2026-10-06T08:00:00Z",
                        "completedAt": "2026-10-06T08:00:00Z",
                        "queryUrl": "/openapi/v1/static/operations/301",
                        "orderNo": "STATIC-RENEW-DEMO-001"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-operation-detail",
        "tags": [
          "静态 IP"
        ],
        "description": "查询逐实例操作结果。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/operations/301?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/countries": {
      "get": {
        "operationId": "get__countries",
        "summary": "查询静态国家目录",
        "parameters": [
          {
            "in": "query",
            "name": "ispType",
            "schema": {
              "type": "integer",
              "enum": [
                1,
                2
              ]
            },
            "description": "IP 类型：1 原生IP，2 独享IP；与控制台销售类型一致。",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "countryCode",
                              "countryName"
                            ],
                            "properties": {
                              "countryCode": {
                                "type": "string",
                                "description": "国家三字码，例如 USA；使用国家目录返回值。"
                              },
                              "countryName": {
                                "type": "string",
                                "description": "国家展示名称。"
                              }
                            }
                          },
                          "description": "结果或提交明细数组，具体字段见下级。"
                        }
                      },
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "countryCode": "USA",
                            "countryName": "美国"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-countries",
        "tags": [
          "静态 IP"
        ],
        "description": "查询静态国家目录。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/countries?api_key=${STATIC_API_KEY}\""
          }
        ]
      }
    },
    "/cities": {
      "get": {
        "operationId": "get__cities",
        "summary": "查询指定国家的静态城市目录",
        "parameters": [
          {
            "in": "query",
            "name": "countryCode",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{3}$"
            },
            "description": "国家三字码，例如 USA",
            "example": "USA"
          },
          {
            "in": "query",
            "name": "ispType",
            "schema": {
              "type": "integer",
              "enum": [
                1,
                2
              ]
            },
            "description": "IP 类型：1 原生IP，2 独享IP；与控制台销售类型一致。",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "countryCode",
                              "cityCode",
                              "cityName"
                            ],
                            "properties": {
                              "countryCode": {
                                "type": "string",
                                "description": "国家三字码，例如 USA；使用国家目录返回值。"
                              },
                              "cityCode": {
                                "type": "string",
                                "description": "城市编码，使用城市目录返回值。"
                              },
                              "cityName": {
                                "type": "string",
                                "description": "城市展示名称。"
                              }
                            }
                          },
                          "description": "结果或提交明细数组，具体字段见下级。"
                        }
                      },
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "countryCode": "USA",
                            "cityCode": "NYC",
                            "cityName": "纽约"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-cities",
        "tags": [
          "静态 IP"
        ],
        "description": "查询指定国家的静态城市目录。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/cities?api_key=${STATIC_API_KEY}&countryCode=USA\""
          }
        ]
      }
    },
    "/instances/search": {
      "post": {
        "operationId": "post__instances_search",
        "summary": "批量搜索静态实例",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/InstancePage",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "instanceId": 101,
                            "offerId": 17,
                            "status": "active",
                            "ip": "203.0.113.10",
                            "port": 9000,
                            "protocols": [
                              "http",
                              "socks5"
                            ],
                            "countryCode": "USA",
                            "cityCode": "NYC",
                            "ispType": 1,
                            "expiresAt": "2026-10-06T08:00:00Z",
                            "activatedAt": "2026-10-06T08:00:00Z",
                            "capabilities": {
                              "purchase": {
                                "minDays": 30,
                                "maxDays": 360,
                                "stepDays": 30
                              },
                              "renew": {
                                "allowedDays": [
                                  30
                                ]
                              },
                              "convertTrial": {},
                              "trialDays": 0,
                              "changeIp": false,
                              "selectReplacement": false,
                              "customCredentials": true,
                              "randomCredentials": true,
                              "maxBatchSize": 100
                            },
                            "groupId": null
                          }
                        ],
                        "page": 1,
                        "pageSize": 20,
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstanceSearchInput"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "ips": [
                      "192.0.2.1:18080",
                      "[2001:db8::4]:18080"
                    ],
                    "orderNo": "STATIC-DEMO-001",
                    "groupId": 0,
                    "countryCode": "USA",
                    "cityCode": "NYC",
                    "status": "active",
                    "page": 1,
                    "pageSize": 20,
                    "activatedFrom": "2026-08-07T00:00:00+08:00",
                    "activatedTo": "2026-08-07T23:59:59.999+08:00"
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-instance-search",
        "tags": [
          "静态 IP"
        ],
        "description": "只读批量精确 IP 搜索，与订单/分组/地区/状态取交集。完整 IPv4/IPv6 校验并去重，每次最多 500 个。无效、空集合、超限整批拒绝，不泄露其他账户匹配情况。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/search?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"ips\":[\"203.0.113.10\",\"2001:db8::1\"],\"orderNo\":\"STATIC-DEMO-001\",\"groupId\":0,\"countryCode\":\"USA\",\"cityCode\":\"NYC\",\"status\":\"active\",\"page\":1,\"pageSize\":20}'"
          }
        ]
      }
    },
    "/groups": {
      "get": {
        "operationId": "get__groups",
        "summary": "查询静态 IP 分组",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Groups",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "items": [
                          {
                            "groupId": 12,
                            "name": "Work",
                            "createdAt": "2026-10-06T08:00:00Z",
                            "updatedAt": "2026-10-06T08:00:00Z"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-groups",
        "tags": [
          "静态 IP"
        ],
        "description": "查询静态 IP 分组。仅访问当前令牌账户的数据。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET \\\n  \"https://api.zzhttp.com/openapi/v1/static/groups?api_key=${STATIC_API_KEY}\""
          }
        ]
      },
      "post": {
        "operationId": "post__groups",
        "summary": "创建静态 IP 分组",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Group",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "groupId": 12,
                        "name": "Work",
                        "createdAt": "2026-10-06T08:00:00Z",
                        "updatedAt": "2026-10-06T08:00:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupInput"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "name": "Work"
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-create-group",
        "tags": [
          "静态 IP"
        ],
        "description": "创建本人单层分组，名称 trim 后 1–50 个字符，同账户重名返回 400 / 10700。不支持删除、改名或多级分组。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST \\\n  \"https://api.zzhttp.com/openapi/v1/static/groups?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"name\":\"Work\"}'"
          }
        ]
      }
    },
    "/instances/group": {
      "put": {
        "operationId": "put__instances_group",
        "summary": "移动静态实例到分组",
        "parameters": [],
        "responses": {
          "200": {
            "description": "成功",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "const": 200,
                      "description": "统一数字业务码：HTTP 与业务码成功均为 200；异步受理不代表交付完成。"
                    },
                    "message": {
                      "type": "string",
                      "description": "服务端结果说明。"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
                    },
                    "data": {
                      "$ref": "#/components/schemas/GroupMoveResult",
                      "description": "本接口业务数据。"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "requestId",
                    "data"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "example": {
                    "summary": "成功响应",
                    "value": {
                      "code": 200,
                      "message": "成功",
                      "requestId": "00000000-0000-4000-8000-000000000001",
                      "data": {
                        "updatedCount": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "标准业务错误；500可能结果不确定，保留业务编号查询",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "example": {
                    "summary": "参数错误示例",
                    "value": {
                      "code": 10700,
                      "message": "请求参数无效",
                      "requestId": "00000000-0000-4000-8000-000000000001"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupMoveInput"
              },
              "examples": {
                "variant1": {
                  "summary": "请求示例",
                  "value": {
                    "instanceIds": [
                      101
                    ],
                    "groupId": 12
                  }
                }
              }
            }
          }
        },
        "x-doc-path": "/developers/api/static-move-group",
        "tags": [
          "静态 IP"
        ],
        "description": "移动所选实例到目标分组，groupId=0 表示移回未分组。实例和目标分组须属于当前账户；任一选择无效时全部不移动。分组调整不影响代理使用。",
        "x-retry-notes": "读取请求遇到业务码 10713 按 Retry-After 等待；500 可有限重试。分组创建结果不明时先查询分组列表；移动同一目标可安全重试。",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request PUT \\\n  \"https://api.zzhttp.com/openapi/v1/static/instances/group?api_key=${STATIC_API_KEY}\" \\\n  --header 'Content-Type: application/json' \\\n  --data '{\"instanceIds\":[101],\"groupId\":12}'"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AccountAPIKey": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "账户设置中的统一 API 令牌，允许调用全部公开 API。"
      }
    },
    "schemas": {
      "PurchaseItem": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "当前可采购商品 ID，来自商品列表。"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "该商品采购数量，1–1000；还需满足可售库存与货源能力。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 30,
            "maximum": 360,
            "default": 30,
            "description": "采购时长（天）；省略为30，范围30–360，须满足商品 capabilities.purchase；采购期限须为30天倍数。"
          }
        },
        "required": [
          "offerId",
          "quantity"
        ],
        "additionalProperties": false
      },
      "OrderInput": {
        "type": "object",
        "properties": {
          "clientOrderNo": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
            "description": "客户订单编号，1–64 位字母、数字、_、.、-；同一账户重复提交相同编号和参数时返回原结果。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseItem"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "结果或提交明细数组，具体字段见下级。"
          }
        },
        "required": [
          "clientOrderNo",
          "items"
        ],
        "additionalProperties": false
      },
      "InstanceIDs": {
        "type": "object",
        "properties": {
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          }
        },
        "required": [
          "instanceIds"
        ],
        "additionalProperties": false
      },
      "PurchaseQuote": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "purchase",
            "description": "请求类型或订单类型：purchase 采购，renew 续费；订单可能包含其他已支持操作类型。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseItem"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "结果或提交明细数组，具体字段见下级。"
          }
        },
        "required": [
          "kind",
          "items"
        ],
        "additionalProperties": false
      },
      "RenewQuote": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "renew",
            "description": "请求类型或订单类型：purchase 采购，renew 续费；订单可能包含其他已支持操作类型。"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3650,
            "description": "期限天数；须满足商品/实例 capabilities 中对应期限规则。"
          }
        },
        "required": [
          "kind",
          "instanceIds",
          "durationDays"
        ],
        "additionalProperties": false
      },
      "QuoteInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PurchaseQuote"
          },
          {
            "$ref": "#/components/schemas/RenewQuote"
          }
        ]
      },
      "RenewInput": {
        "type": "object",
        "properties": {
          "clientOperationNo": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
            "description": "客户操作编号，1–64 位字母、数字、_、.、-；同编号不同参数返回 HTTP 200 / 业务码 10705。"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3650,
            "description": "期限天数；须满足商品/实例 capabilities 中对应期限规则。"
          },
          "expectedTotalAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          }
        },
        "required": [
          "clientOperationNo",
          "instanceIds",
          "durationDays",
          "expectedTotalAmountCents"
        ],
        "additionalProperties": false
      },
      "RandomCredentials": {
        "type": "object",
        "properties": {
          "clientOperationNo": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
            "description": "客户操作编号，1–64 位字母、数字、_、.、-；同编号不同参数返回 HTTP 200 / 业务码 10705。"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "randomize": {
            "const": true,
            "description": "true 随机生成凭据；false 时必须同时提交 username 和 password。"
          }
        },
        "required": [
          "clientOperationNo",
          "instanceIds",
          "randomize"
        ],
        "additionalProperties": false
      },
      "CustomCredentials": {
        "type": "object",
        "properties": {
          "clientOperationNo": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
            "description": "客户操作编号，1–64 位字母、数字、_、.、-；同编号不同参数返回 HTTP 200 / 业务码 10705。"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "randomize": {
            "const": false,
            "description": "true 随机生成凭据；false 时必须同时提交 username 和 password。"
          },
          "username": {
            "type": "string",
            "description": "实例代理用户名。"
          },
          "password": {
            "type": "string",
            "writeOnly": true,
            "description": "实例代理密码；仅凭据接口返回，禁止公开存储或日志记录。"
          }
        },
        "required": [
          "clientOperationNo",
          "instanceIds",
          "randomize",
          "username",
          "password"
        ],
        "additionalProperties": false
      },
      "CredentialUpdateInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RandomCredentials"
          },
          {
            "$ref": "#/components/schemas/CustomCredentials"
          }
        ]
      },
      "SettlementSource": {
        "type": "object",
        "properties": {
          "reservedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "capturedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "releasedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "ExternalSettlement": {
        "type": "object",
        "properties": {
          "paidAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "capturedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "unsettledAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "refundDueAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "refundedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "refundPendingAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Settlement": {
        "type": "object",
        "properties": {
          "fundingSource": {
            "enum": [
              "wallet",
              "external",
              "none"
            ],
            "description": "资金来源：wallet 钱包，external 历史外部支付，none 未付款或免费。"
          },
          "external": {
            "$ref": "#/components/schemas/ExternalSettlement",
            "description": "历史外部支付结算信息，不能把应退当已退。"
          },
          "reservedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "frozenAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "capturedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "releasedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "gift": {
            "$ref": "#/components/schemas/SettlementSource",
            "description": "赠送余额的冻结、扣除与释放。"
          },
          "recharge": {
            "$ref": "#/components/schemas/SettlementSource",
            "description": "充值余额的冻结、扣除与释放。"
          }
        },
        "required": [],
        "additionalProperties": false,
        "example": {
          "fundingSource": "wallet",
          "reservedAmountCents": 3500,
          "frozenAmountCents": 0,
          "capturedAmountCents": 3500,
          "releasedAmountCents": 0,
          "gift": {
            "reservedAmountCents": 0,
            "capturedAmountCents": 0,
            "releasedAmountCents": 0
          },
          "recharge": {
            "reservedAmountCents": 3500,
            "capturedAmountCents": 3500,
            "releasedAmountCents": 0
          }
        }
      },
      "Balance": {
        "type": "object",
        "properties": {
          "rechargeBalanceCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "giftBalanceCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "frozenAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "purchasableAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "currency": {
            "const": "CNY",
            "description": "金额币种，当前合同为 CNY。"
          }
        },
        "required": [
          "rechargeBalanceCents",
          "giftBalanceCents",
          "frozenAmountCents",
          "purchasableAmountCents",
          "currency"
        ],
        "additionalProperties": false
      },
      "Offer": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "当前可采购商品 ID，来自商品列表。"
          },
          "ispType": {
            "enum": [
              1,
              2
            ],
            "description": "IP 类型：1 原生IP，2 独享IP；与控制台销售类型一致。"
          },
          "countryCode": {
            "type": "string",
            "description": "国家三字码，例如 USA；使用国家目录返回值。"
          },
          "cityCode": {
            "type": "string",
            "description": "城市编码，使用城市目录返回值。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "商品单价对应的基准周期，当前为30天；实际采购时长由采购项 durationDays 选择。"
          },
          "unitPriceCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "基准周期每个IP的客户价格，人民币整数分；采购周期价以报价结果为准。"
          },
          "currency": {
            "const": "CNY",
            "description": "金额币种，当前合同为 CNY。"
          },
          "pricingSource": {
            "enum": [
              "customer",
              "retail"
            ],
            "description": "价格来源：customer 客户价格，retail 零售价。"
          },
          "availableCount": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "最近同步的可售库存；报价和下单会再次校验。"
          },
          "inventorySyncedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "库存同步时间，RFC3339；未同步为 null。"
          },
          "purchasable": {
            "type": "boolean",
            "description": "当前是否可采购。"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities",
            "description": "真实货源或实例能力；声明不替代提交时业务校验，缺失快照可为空对象。"
          }
        },
        "required": [
          "offerId",
          "ispType",
          "countryCode",
          "cityCode",
          "durationDays",
          "unitPriceCents",
          "currency",
          "pricingSource",
          "availableCount",
          "inventorySyncedAt",
          "purchasable",
          "capabilities"
        ],
        "additionalProperties": false
      },
      "Offers": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Offer"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "inventorySyncedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "库存同步时间，RFC3339；未同步为 null。"
          }
        },
        "required": [
          "items",
          "inventorySyncedAt"
        ],
        "additionalProperties": false
      },
      "QuoteItem": {
        "type": "object",
        "properties": {
          "offerId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "当前可采购商品 ID，来自商品列表。"
          },
          "instanceId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "实例 ID，属于当前账户；分组绑定此 ID。"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "该商品采购数量，1–1000；还需满足可售库存与货源能力。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "期限天数；须满足商品/实例 capabilities 中对应期限规则。"
          },
          "unitPriceCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "amountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "pricingSource": {
            "type": "string",
            "description": "价格来源：customer 客户价格，retail 零售价。"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Quote": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "purchase",
              "renew"
            ],
            "description": "请求类型或订单类型：purchase 采购，renew 续费；订单可能包含其他已支持操作类型。"
          },
          "currency": {
            "const": "CNY",
            "description": "金额币种，当前合同为 CNY。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuoteItem"
            },
            "description": "报价明细；采购项含 offerId，续费项含 instanceId。"
          },
          "totalAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "quotedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "报价时间，RFC3339。"
          },
          "inventoryReserved": {
            "const": false,
            "description": "报价不会预留库存，固定为 false。"
          }
        },
        "required": [
          "kind",
          "currency",
          "items",
          "totalAmountCents",
          "quotedAt",
          "inventoryReserved"
        ],
        "additionalProperties": false
      },
      "OrderItem": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "订单项 ID。"
          },
          "offerId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "当前可采购商品 ID，来自商品列表。"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "processing",
              "succeeded",
              "partial",
              "failed",
              "manual_review"
            ],
            "description": "当前状态；枚举见限制，按逐项结果确认终态。"
          },
          "requestedQuantity": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "订单项请求数量。"
          },
          "deliveredQuantity": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "已交付数量。"
          },
          "durationDays": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "期限天数；须满足商品/实例 capabilities 中对应期限规则。"
          },
          "unitPriceCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "totalAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "pricingSource": {
            "type": "string",
            "description": "价格来源：customer 客户价格，retail 零售价。"
          },
          "frozenAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "capturedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "releasedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "errorCode": {
            "type": "string",
            "description": "逐项原因：OUT_OF_STOCK、SERVICE_UNAVAILABLE、RESULT_UNCONFIRMED、FULFILLMENT_FAILED；成功为空字符串。"
          },
          "errorMessage": {
            "type": "string",
            "description": "失败原因说明。"
          },
          "nextAction": {
            "type": "string",
            "enum": [
              "",
              "check_inventory",
              "query_order",
              "contact_support"
            ],
            "description": "建议下一步；结果不确定时只能查原单。"
          }
        },
        "required": [
          "itemId",
          "offerId",
          "status",
          "requestedQuantity",
          "deliveredQuantity",
          "durationDays",
          "unitPriceCents",
          "totalAmountCents",
          "pricingSource",
          "frozenAmountCents",
          "capturedAmountCents",
          "releasedAmountCents",
          "instanceIds",
          "errorCode"
        ],
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "properties": {
          "orderNo": {
            "type": "string",
            "description": "平台订单号；查询筛选时精确匹配本人订单。"
          },
          "clientOrderNo": {
            "type": "string",
            "description": "客户订单编号，1–64 位字母、数字、_、.、-；同一账户重复提交相同编号和参数时返回原结果。"
          },
          "kind": {
            "type": "string",
            "description": "请求类型或订单类型：purchase 采购，renew 续费；订单可能包含其他已支持操作类型。"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "processing",
              "succeeded",
              "partial",
              "failed",
              "manual_review"
            ],
            "description": "当前状态；枚举见限制，按逐项结果确认终态。"
          },
          "totalAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "currency": {
            "const": "CNY",
            "description": "金额币种，当前合同为 CNY。"
          },
          "settlement": {
            "$ref": "#/components/schemas/Settlement",
            "description": "逐订单资金结算；钱包原冻结 = 当前冻结 + 已扣 + 已释放。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "创建时间，RFC3339。"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "完成时间，RFC3339；未结束为 null。"
          },
          "queryUrl": {
            "type": "string",
            "description": "轮询查询的相对路径，仍需附加 api_key 认证。"
          },
          "source": {
            "type": "string",
            "enum": [
              "console",
              "admin",
              "api"
            ],
            "description": "下单来源：用户控制台、后台管理、公开API"
          },
          "operationId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "关联收费操作ID；无关联时省略"
          },
          "clientOperationNo": {
            "type": "string",
            "description": "关联收费操作的客户业务号；无关联时省略"
          }
        },
        "required": [
          "orderNo",
          "clientOrderNo",
          "kind",
          "status",
          "totalAmountCents",
          "currency",
          "settlement",
          "items",
          "createdAt",
          "completedAt",
          "queryUrl",
          "source"
        ],
        "additionalProperties": false,
        "example": {
          "orderNo": "STATIC-DEMO-001",
          "clientOrderNo": "platform-order-001",
          "kind": "purchase",
          "status": "succeeded",
          "totalAmountCents": 3500,
          "currency": "CNY",
          "settlement": {
            "fundingSource": "wallet",
            "reservedAmountCents": 3500,
            "frozenAmountCents": 0,
            "capturedAmountCents": 3500,
            "releasedAmountCents": 0,
            "gift": {
              "reservedAmountCents": 0,
              "capturedAmountCents": 0,
              "releasedAmountCents": 0
            },
            "recharge": {
              "reservedAmountCents": 3500,
              "capturedAmountCents": 3500,
              "releasedAmountCents": 0
            }
          },
          "items": [
            {
              "itemId": 201,
              "offerId": 17,
              "status": "succeeded",
              "requestedQuantity": 1,
              "deliveredQuantity": 1,
              "durationDays": 30,
              "unitPriceCents": 3500,
              "totalAmountCents": 3500,
              "pricingSource": "retail",
              "frozenAmountCents": 0,
              "capturedAmountCents": 3500,
              "releasedAmountCents": 0,
              "instanceIds": [
                101
              ],
              "errorCode": "",
              "errorMessage": "",
              "nextAction": ""
            }
          ],
          "createdAt": "2026-10-06T08:00:00Z",
          "completedAt": "2026-10-06T08:00:00Z",
          "queryUrl": "/openapi/v1/static/orders/STATIC-DEMO-001",
          "source": "api"
        }
      },
      "OperationItem": {
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "实例 ID，属于当前账户；分组绑定此 ID。"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "processing",
              "succeeded",
              "partial",
              "failed",
              "manual_review"
            ],
            "description": "当前状态；枚举见限制，按逐项结果确认终态。"
          },
          "amountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "frozenAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "capturedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "releasedAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "errorCode": {
            "type": "string",
            "description": "逐项原因：OUT_OF_STOCK、SERVICE_UNAVAILABLE、RESULT_UNCONFIRMED、FULFILLMENT_FAILED；成功为空字符串。"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "完成时间，RFC3339；未结束为 null。"
          },
          "errorMessage": {
            "type": "string",
            "description": "失败原因说明。"
          },
          "nextAction": {
            "type": "string",
            "enum": [
              "",
              "check_inventory",
              "query_order",
              "contact_support"
            ],
            "description": "建议下一步；结果不确定时只能查原单。"
          }
        },
        "required": [
          "instanceId",
          "status",
          "amountCents",
          "frozenAmountCents",
          "capturedAmountCents",
          "releasedAmountCents",
          "errorCode",
          "completedAt"
        ],
        "additionalProperties": false
      },
      "Operation": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "平台操作 ID。"
          },
          "clientOperationNo": {
            "type": "string",
            "description": "客户操作编号，1–64 位字母、数字、_、.、-；同编号不同参数返回 HTTP 200 / 业务码 10705。"
          },
          "type": {
            "type": "string",
            "description": "操作/事件类型。"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "processing",
              "succeeded",
              "partial",
              "failed",
              "manual_review"
            ],
            "description": "当前状态；枚举见限制，按逐项结果确认终态。"
          },
          "totalAmountCents": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "人民币整数分"
          },
          "currency": {
            "const": "CNY",
            "description": "金额币种，当前合同为 CNY。"
          },
          "settlement": {
            "$ref": "#/components/schemas/Settlement",
            "description": "逐订单资金结算；钱包原冻结 = 当前冻结 + 已扣 + 已释放。"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationItem"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "创建时间，RFC3339。"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "完成时间，RFC3339；未结束为 null。"
          },
          "queryUrl": {
            "type": "string",
            "description": "轮询查询的相对路径，仍需附加 api_key 认证。"
          },
          "orderNo": {
            "type": "string",
            "description": "关联收费订单号；无收费订单时省略"
          }
        },
        "required": [
          "operationId",
          "clientOperationNo",
          "type",
          "status",
          "totalAmountCents",
          "currency",
          "settlement",
          "items",
          "createdAt",
          "completedAt",
          "queryUrl"
        ],
        "additionalProperties": false,
        "example": {
          "operationId": 301,
          "clientOperationNo": "platform-renew-001",
          "type": "renewal",
          "status": "succeeded",
          "totalAmountCents": 3500,
          "currency": "CNY",
          "settlement": {
            "fundingSource": "wallet",
            "reservedAmountCents": 3500,
            "frozenAmountCents": 0,
            "capturedAmountCents": 3500,
            "releasedAmountCents": 0,
            "gift": {
              "reservedAmountCents": 0,
              "capturedAmountCents": 0,
              "releasedAmountCents": 0
            },
            "recharge": {
              "reservedAmountCents": 3500,
              "capturedAmountCents": 3500,
              "releasedAmountCents": 0
            }
          },
          "items": [
            {
              "instanceId": 101,
              "status": "succeeded",
              "amountCents": 3500,
              "frozenAmountCents": 0,
              "capturedAmountCents": 3500,
              "releasedAmountCents": 0,
              "errorCode": "",
              "completedAt": "2026-10-06T08:00:00Z",
              "errorMessage": "",
              "nextAction": ""
            }
          ],
          "createdAt": "2026-10-06T08:00:00Z",
          "completedAt": "2026-10-06T08:00:00Z",
          "queryUrl": "/openapi/v1/static/operations/301",
          "orderNo": "STATIC-RENEW-DEMO-001"
        }
      },
      "Instance": {
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "实例 ID，属于当前账户；分组绑定此 ID。"
          },
          "offerId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "当前可采购商品 ID，来自商品列表。"
          },
          "status": {
            "type": "string",
            "enum": [
              "provisioning",
              "active",
              "expired",
              "cancelled",
              "failed"
            ],
            "description": "当前状态；枚举见限制，按逐项结果确认终态。"
          },
          "ip": {
            "type": "string",
            "description": "实例实际 IP 地址。"
          },
          "port": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "实例直连端口。"
          },
          "protocols": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "支持协议；实例列表为字符串数组，凭据响应为逗号分隔字符串。"
          },
          "countryCode": {
            "type": "string",
            "description": "国家三字码，例如 USA；使用国家目录返回值。"
          },
          "cityCode": {
            "type": "string",
            "description": "城市编码，使用城市目录返回值。"
          },
          "ispType": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "IP 类型：1 原生IP，2 独享IP；与控制台销售类型一致。"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "实例到期时间，RFC3339；未知为 null。"
          },
          "activatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "实例激活时间，RFC3339；未激活为 null。"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities",
            "description": "真实货源或实例能力；声明不替代提交时业务校验，缺失快照可为空对象。"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "所属自定义分组 ID，未分组为 null；新实例默认未分组。"
          }
        },
        "required": [
          "instanceId",
          "offerId",
          "status",
          "ip",
          "port",
          "protocols",
          "countryCode",
          "cityCode",
          "ispType",
          "expiresAt",
          "activatedAt",
          "capabilities",
          "groupId"
        ],
        "additionalProperties": false,
        "example": {
          "instanceId": 101,
          "offerId": 17,
          "status": "active",
          "ip": "203.0.113.10",
          "port": 9000,
          "protocols": [
            "http",
            "socks5"
          ],
          "countryCode": "USA",
          "cityCode": "NYC",
          "ispType": 1,
          "expiresAt": "2026-11-05T08:00:00Z",
          "activatedAt": "2026-10-06T08:00:00Z",
          "capabilities": {
            "purchase": {
              "minDays": 30,
              "maxDays": 360,
              "stepDays": 30
            },
            "renew": {
              "allowedDays": [
                30
              ]
            },
            "convertTrial": {},
            "trialDays": 0,
            "changeIp": false,
            "selectReplacement": false,
            "customCredentials": true,
            "randomCredentials": true,
            "maxBatchSize": 100
          },
          "groupId": null
        }
      },
      "Credential": {
        "type": "object",
        "properties": {
          "instanceId": {
            "type": "integer",
            "minimum": 1,
            "format": "int64",
            "description": "实例 ID，属于当前账户；分组绑定此 ID。"
          },
          "ip": {
            "type": "string",
            "description": "实例实际 IP 地址。"
          },
          "port": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "实例直连端口。"
          },
          "protocols": {
            "type": "string",
            "description": "支持协议；实例列表为字符串数组，凭据响应为逗号分隔字符串。"
          },
          "username": {
            "type": "string",
            "description": "实例代理用户名。"
          },
          "password": {
            "type": "string",
            "description": "实例代理密码；仅凭据接口返回，禁止公开存储或日志记录。"
          }
        },
        "required": [
          "instanceId",
          "ip",
          "port",
          "protocols",
          "username",
          "password"
        ],
        "additionalProperties": false
      },
      "Credentials": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Credential"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "OrderPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "页码，从 1 开始，默认 1。"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "每页数量，默认 20；最大值见字段限制。"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "筛选后的总记录数，不是当前页条数。"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "additionalProperties": false
      },
      "OperationPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "页码，从 1 开始，默认 1。"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "每页数量，默认 20；最大值见字段限制。"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "筛选后的总记录数，不是当前页条数。"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "additionalProperties": false
      },
      "InstancePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Instance"
            },
            "description": "结果或提交明细数组，具体字段见下级。"
          },
          "page": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "页码，从 1 开始，默认 1。"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "每页数量，默认 20；最大值见字段限制。"
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "format": "int64",
            "description": "筛选后的总记录数，不是当前页条数。"
          }
        },
        "required": [
          "items",
          "page",
          "pageSize",
          "total"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "统一数字业务码，详见静态 API 文档"
          },
          "message": {
            "type": "string",
            "description": "服务端结果说明。"
          },
          "requestId": {
            "type": "string",
            "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
          }
        },
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "additionalProperties": false
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "通知唯一事件 ID，用于通知去重。"
          },
          "type": {
            "enum": [
              "order.completed"
            ],
            "description": "操作/事件类型。"
          },
          "occurredAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "事件发生时间，RFC3339。"
          },
          "data": {
            "type": "object",
            "description": "本接口业务数据。"
          }
        },
        "required": [
          "eventId",
          "type",
          "occurredAt",
          "data"
        ],
        "additionalProperties": false
      },
      "InstanceSearchInput": {
        "type": "object",
        "properties": {
          "ips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 10000,
            "description": "完整 IP、IPv4:port 或 [IPv6]:port；端口 1–65535。带端口精确匹配 IP 与端口，不带端口匹配全部端口。IPv6 带端口须加方括号；拒绝 CIDR、zone、片段。原始最多10000项，按IP与端口去重后1–500项。地址文本保留首个原文精确匹配。"
          },
          "orderNo": {
            "type": "string",
            "description": "平台订单号；查询筛选时精确匹配本人订单。"
          },
          "groupId": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "筛选分组：省略或 null 为全部，0 为未分组，正整数为本人分组。"
          },
          "countryCode": {
            "type": "string",
            "description": "国家三字码，例如 USA；使用国家目录返回值。"
          },
          "cityCode": {
            "type": "string",
            "description": "城市编码，使用城市目录返回值。"
          },
          "status": {
            "type": "string",
            "description": "实例状态精确筛选：provisioning、active、expired、cancelled 或 failed。"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "default": 1,
            "description": "页码，从 1 开始，默认 1。"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "default": 20,
            "description": "每页数量，默认 20；最大值见字段限制。"
          },
          "activatedFrom": {
            "type": "string",
            "format": "date-time",
            "description": "开通时间下界，含边界；含时区 RFC3339，可单独指定。",
            "example": "2026-08-07T00:00:00+08:00"
          },
          "activatedTo": {
            "type": "string",
            "format": "date-time",
            "description": "开通时间上界，含边界；含时区 RFC3339，可单独指定，不能早于下界。",
            "example": "2026-08-07T23:59:59.999+08:00"
          }
        },
        "required": [
          "ips"
        ],
        "additionalProperties": false
      },
      "GroupInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "名称去除首尾空白后 1–50 个字符，账户内不得重复；长度以 Unicode 字符计。"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "Group": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "integer",
            "minimum": 1,
            "description": "分组 ID。"
          },
          "name": {
            "type": "string",
            "description": "自定义分组名称。"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "创建时间，RFC3339。"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "最后更新时间，RFC3339。"
          }
        },
        "required": [
          "groupId",
          "name",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Groups": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "description": "本人分组列表，按 ID 升序；没有分组时为空数组。"
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "GroupMoveInput": {
        "type": "object",
        "properties": {
          "instanceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "format": "int64"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "本人实例 ID 数组，每次 1–100 项；任一实例无效则整批拒绝。"
          },
          "groupId": {
            "type": "integer",
            "minimum": 0,
            "description": "必填目标分组 ID：0 移回未分组；正整数必须属于当前账户。"
          }
        },
        "required": [
          "instanceIds",
          "groupId"
        ],
        "additionalProperties": false
      },
      "GroupMoveResult": {
        "type": "object",
        "properties": {
          "updatedCount": {
            "type": "integer",
            "minimum": 0,
            "description": "实际更新的去重实例数量。",
            "example": 1
          }
        },
        "required": [
          "updatedCount"
        ],
        "additionalProperties": false
      },
      "DurationRule": {
        "type": "object",
        "properties": {
          "allowedDays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "description": "允许的期限天数集合；非空时优先采用该集合。"
          },
          "minDays": {
            "type": "integer",
            "minimum": 0,
            "description": "无 allowedDays 集合时的最短期限。"
          },
          "maxDays": {
            "type": "integer",
            "minimum": 0,
            "description": "最长期限，0 表示不设上限。"
          },
          "stepDays": {
            "type": "integer",
            "minimum": 0,
            "description": "从最短期限起允许的增量天数。"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Capabilities": {
        "type": "object",
        "properties": {
          "purchase": {
            "$ref": "#/components/schemas/DurationRule",
            "description": "采购期限规则。"
          },
          "renew": {
            "$ref": "#/components/schemas/DurationRule",
            "description": "续费期限规则。"
          },
          "convertTrial": {
            "$ref": "#/components/schemas/DurationRule",
            "description": "试用转正式期限规则。"
          },
          "trialDays": {
            "type": "integer",
            "minimum": 0,
            "description": "试用期限天数；0 表示不提供试用。"
          },
          "changeIp": {
            "type": "boolean",
            "description": "是否支持换 IP。"
          },
          "selectReplacement": {
            "type": "boolean",
            "description": "是否支持选择替换节点。"
          },
          "customCredentials": {
            "type": "boolean",
            "description": "是否支持客户指定账密。"
          },
          "randomCredentials": {
            "type": "boolean",
            "description": "是否支持随机生成账密。"
          },
          "maxBatchSize": {
            "type": "integer",
            "minimum": 0,
            "description": "货源能力声明的批量上限；服务端请求限制仍适用。"
          }
        },
        "required": [],
        "additionalProperties": false,
        "example": {
          "purchase": {
            "minDays": 30,
            "maxDays": 360,
            "stepDays": 30
          },
          "renew": {
            "allowedDays": [
              30
            ]
          },
          "convertTrial": {},
          "trialDays": 0,
          "changeIp": false,
          "selectReplacement": false,
          "customCredentials": true,
          "randomCredentials": true,
          "maxBatchSize": 100
        }
      },
      "PurchaseError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "统一数字业务码，详见静态 API 文档"
          },
          "message": {
            "type": "string",
            "description": "服务端结果说明。"
          },
          "requestId": {
            "type": "string",
            "description": "本次请求的追踪 ID，用于排障，不是业务幂等编号。"
          },
          "data": {
            "$ref": "#/components/schemas/Order",
            "description": "已创建订单的同步失败结果；下单前拒绝时可无此字段。"
          }
        },
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "additionalProperties": false
      }
    }
  },
  "webhooks": {
    "staticResourceChanged": {
      "post": {
        "summary": "静态订单结果通知；使用 eventId 去重，处理重复与乱序",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "X-ZZ-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-ZZ-Timestamp",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-ZZ-Nonce",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-ZZ-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "已持久接收或重复事件，2xx确认成功"
          }
        }
      }
    }
  }
}
