合作伙伴 API(B2B)
在售国家
GET /b2b/v1/countries — 获取有在售商品的国家列表(韩文或英文名称)。
请求#
GET
/b2b/v1/countriescurl "https://api.esimoa.com/b2b/v1/countries?lang=en" \
-H "X-API-Key: $ESIMOA_PARTNER_KEY"const res = await fetch('https://api.esimoa.com/b2b/v1/countries?lang=en', {
headers: { 'X-API-Key': process.env.ESIMOA_PARTNER_KEY },
});
const { data: countries } = await res.json();res = requests.get(
"https://api.esimoa.com/b2b/v1/countries",
params={"lang": "en"},
headers={"X-API-Key": os.environ["ESIMOA_PARTNER_KEY"]},
timeout=10,
)
countries = res.json()["data"]查询参数#
| 参数 | 类型 | 说明 |
|---|---|---|
lang | 'ko' | 'en' | 国家名称语言(默认 ko) |
响应#
200 OKjson
{
"success": true,
"data": [
{ "countryCode": "AU", "name": "Australia", "planCount": 64 },
{ "countryCode": "JP", "name": "Japan", "planCount": 128 }
]
}| 字段 | 类型 | 说明 |
|---|---|---|
countryCode | string | ISO 3166-1 alpha-2 国家代码 |
name | string | 国家名称(按 lang) |
planCount | integer? | 在售商品数量 — 未知时省略 |
列表按所请求语言的国家名称排序,不含无在售商品的国家与多国商品。多国商品请在商品搜索中使用 isMultiCountry=true。
