合作夥伴 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。
