公開API(/v1)
販売国
GET /v1/countries — eSIMを販売している国と商品数・最安値を取得します。
このページの内容
リクエスト#
GET
/v1/countriescurl "https://api.esimoa.com/v1/countries?q=japan&lang=en" \
-H "X-API-Key: esk_live_your_key_here"const res = await fetch('https://api.esimoa.com/v1/countries?q=japan&lang=en', {
headers: { 'X-API-Key': process.env.ESIMOA_API_KEY },
});
const { items } = await res.json();res = requests.get(
"https://api.esimoa.com/v1/countries",
params={"q": "japan", "lang": "en"},
headers={"X-API-Key": os.environ["ESIMOA_API_KEY"]},
timeout=10,
)
countries = res.json()["items"]クエリパラメータ#
| パラメータ | 型 | 説明 |
|---|---|---|
q | string | 国名・コードで検索(任意) |
lang | string | レスポンス言語 ko | en | ja | zh-CN | zh-TW(既定 en) |
q は5言語いずれの国名でも検索できます(例: japan、일본、日本)。
レスポンス#
200 OKjson
{
"success": true,
"items": [
{
"countryCode": "JP",
"name": "Japan",
"planCount": 128,
"lowestPriceKrw": 1000,
"url": "https://www.esimoa.com/en/plans/jp?ref=p_yourcode"
}
]
}Country オブジェクト#
| フィールド | 型 | 説明 |
|---|---|---|
countryCode | string | ISO 3166-1 alpha-2 国コード |
name | string | 国名(lang に準拠) |
planCount | integer | 販売中の商品数 |
lowestPriceKrw | integer | null | 最安値(ウォン) |
url | string | 国別プランページ — パートナーコード(?ref=)付き |
