API สำหรับพาร์ตเนอร์ (B2B)
ประเทศ
GET /b2b/v1/countries — list countries that have products on sale, with Korean or English names.
On this page
Request#
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"]Query parameters#
| พารามิเตอร์ | ประเภท | คำอธิบาย |
|---|---|---|
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 ในการค้นหาสินค้า
