新购下单

本接口用于新购下单

接口信息

POST /client/order/addStatic

请求头

参数名必选类型说明
x-merchant-tokenstring商户访问令牌
x-merchant-codestring商户编码

请求参数

参数名必选类型说明
countryNumsArray of CountryNumsItemVO国家IP数量分配列表
monthCountLong购买几个月
dayCountLong购买天数(仅支持:7)
currencyString货币类型CNY

CountryNumsItemVO结构

参数名必选类型说明
countryCodeString国家代码
locationString省/州/区
numLong该国家需要的IP数量
ipTypeLong0:广播 1:原生
ipCategoryStringHOST-住宅 IDC-机房

请求示例

const response = await fetch('/client/order/addStatic', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-merchant-token': 'your-token-here',
    'x-merchant-code': 'your-merchant-code'
  },
  body: JSON.stringify({
      "countryNums": [
          {
              "countryCode": "US",
              "num": "2",
              "location" : "New York",
              "ipType":1,
              "ipCategory":"HOST"
          }
      ],
      "monthCount":1,
      "currency":"CNY"
  })
});

const result = await response.json();

响应结果

{
    "msg": "操作成功",
    "code": 200,
    "data": "N2025032701271232584"
}

注意事项

  1. dayCount参数仅支持7天,并且传入dayCount参数将忽略monthCount参数。
  2. 并非所有地区都支持7天购买,请根据实际情况选择(需要参考'/client/ip/pool/regionalAvailableIps'接口是否有返回price7具体价格而定)。