主题
Merchant Amazon 地点列表
接口说明
用于获取 Merchant API 支持的 Amazon 地点列表。返回结果可用于创建任务时填写地点参数,也可以按国家维度筛选可用地点。
说明:由于平台服务策略调整,俄罗斯和白俄罗斯的地点当前不再支持。
计费说明
调用本接口不收费。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准;本接口通常返回 0。
请求地址
获取支持地点
GET https://api.seermartech.cn/v3/merchant/amazon/locations
按国家筛选地点
GET https://api.seermartech.cn/v3/merchant/amazon/locations/$country
$country 为国家 ISO 代码,例如:us
路径参数
| 参数名 | 类型 | 填 | 说明 |
|---|---|---|---|
country | string | 否 | 国家 ISO 代码。传后返回该国家下的支持地点,例如 us |
返回结构
接口返回 JSON 数据,顶层 tasks 数组,每个任务中结果。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表参考 /v3/appendix/errors |
status_message | string | 通用状态信息,完整列表参考 /v3/appendix/errors |
time | string | 执行耗时,单位:秒 |
cost | float | 本次请求总费用,单位:USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表参考 /v3/appendix/errors |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位:秒 |
cost | float | 单个任务费用,单位:USD |
result_count | integer | result 数组中的结果数量 |
path | array | URL 路径 |
data | object | GET 请求 URL 中携带的参数 |
result | array | 地点结果列表 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
location_code | integer | 地点编码 |
location_name | string | 地点完整名称 |
location_name_parent | string | 上级地点名称 |
country_iso_code | string | 地点所属国家 ISO 代码 |
location_type | string | 地点类型 |
返回示例字段说明
json
{
"location_code": 9041134,
"location_name": "90290,California,United States",
"location_name_parent": "California,United States"
}含义如下:
location_code:地点唯一编码location_name:完整地点名称,通常邮编、州/省、国家location_name_parent:父级地点名称
请求示例
cURL
bash
curl --location --request GET "https://api.seermartech.cn/v3/merchant/amazon/locations" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"按国家筛选:
bash
curl --location --request GET "https://api.seermartech.cn/v3/merchant/amazon/locations/us" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
url = "https://api.seermartech.cn/v3/merchant/amazon/locations"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
result = response.json
if result.get("status_code") == 20000:
print(result)
else:
print(f'error. Code: {result.get("status_code")} Message: {result.get("status_message")}')按国家筛选:
python
import requests
country = "us"
url = f"https://api.seermartech.cn/v3/merchant/amazon/locations/{country}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
// 获取支持地点
axios({
method: "get",
url: "https://api.seermartech.cn/v3/merchant/amazon/locations",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
})
.then(function (response) {
// 返回结果
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});按国家筛选:
typescript
import axios from "axios";
const country = "us";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/merchant/amazon/locations/${country}`,
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
})
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});响应示例
json
{
"version": "0.1.20200421",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2710 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2710 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"merchant",
"amazon",
"locations"
],
"data": {
"api": "merchant",
"function": "locations",
"se": "amazon"
},
"result": [
{
"location_code": 9041134,
"location_name": "90290,California,United States",
"location_name_parent": "California,United States",
"country_iso_code": "us",
"location_type": "Postal Code"
}
]
}
]
}错误码说明
本接口使用统一状态码体系:
- 顶层
status_code:表示整个请求的执行状态 tasks[].status_code:表示单个任务的执行状态
常见成功状态:
| 状态码 | 说明 |
|---|---|
20000 | 请求成功 |
更多错误码与状态信息请参考 /v3/appendix/errors。
使用建议
- 在创建 Merchant Amazon 任务前,通过本接口拉取最新地点列表,提交不支持的地点。
- 若业务只单一国家,建议使用
/v3/merchant/amazon/locations/$country缩小返回范围。 - 建议将
location_code作为系统的标准地点标识,依赖字符串名称匹。 - 平台地点支持范围可能变化,建议定期同步更新。
实用场景
- 校验投放地点参数:在创建 Amazon 商品或商家采集任务前,校验
location_code是否有效,减少任务失败率。 - 构建国家级地点映射表:按国家批量拉取地点列表,建立地点字,便于任务和运营后台选择。
- 规范地点:将用户的邮编、州、省等信息映射为标准
location_code,提升数据一致性。 - 监控地点支持变更:定期同步可用地点,及时发现下线地区,历史任务失效。
- 优化多市场采集流程:针对不同国家独立获取支持地点范围,为跨境电商 SEO 与商品报采集提供标准化基础数据。