查询可用国家地区

查询可用国家地区信息。

接口信息

GET /client/ip/dynamics/getLocationList

请求头

参数名类型描述
x-merchant-tokenString商户令牌
x-merchant-codeString商户代码
Content-TypeStringapplication/json

请求参数

参数名必选类型描述
accountIdLong用户账号ID

响应示例

{
    "total": 15420,
    "rows": [
      {
        "countryCode": "AD",
        "countryName": "安道尔公国",
        "stateCode": "encamp",
        "cityCode": "encamp"
      },
      {
        "countryCode": "AE",
        "countryName": "阿联酋",
        "stateCode": "abudhabi",
        "cityCode": "abudhabi"
      }
    ],
    "code": 200,
    "msg": "查询成功"
}

代码示例

// 使用 fetch 查询地区
fetch('/client/ip/dynamics/getLocationList?accountId=123', {
    method: 'GET',
    headers: {
        'x-merchant-token': 'your_token',
        'x-merchant-code': 'your_code',
        'Content-Type': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data));

响应参数说明

参数名类型描述
countryCodeString国家代码
countryNameString国家名称
stateCodeString州/省代码
cityCodeString城市代码