API pública (/v1)
Consigue una eSIM
GET /v1/esims/:id — get one eSIM and its purchase link by the id from search results.
On this page
Request#
GET
/v1/esims/:idcurl "https://api.esimoa.com/v1/esims/partner_9VKPYQ3JRYVK5797?lang=en" \
-H "X-API-Key: esk_live_your_key_here"const id = 'partner_9VKPYQ3JRYVK5797';
const res = await fetch(`https://api.esimoa.com/v1/esims/${encodeURIComponent(id)}?lang=en`, {
headers: { 'X-API-Key': process.env.ESIMOA_API_KEY },
});
if (res.status === 404) {
// the plan is no longer on sale — drop it from your listing
}
const { item } = await res.json();res = requests.get(
f"https://api.esimoa.com/v1/esims/{esim_id}",
params={"lang": "en"},
headers={"X-API-Key": os.environ["ESIMOA_API_KEY"]},
timeout=10,
)
if res.status_code == 404:
... # the plan is no longer on sale
item = res.json()["item"]Parameters#
| Parámetro | Tipo | Descripción |
|---|---|---|
idobligatorio | string | Ruta: el id de los resultados de búsqueda |
lang | string | Idioma de la respuesta: ko | en | ja | zh-CN | zh-TW (en por defecto) |
Respuesta#
item tiene la misma estructura que el objeto Esim de los resultados de búsqueda.
200 OKjson
{
"success": true,
"item": { "id": "partner_9VKPYQ3JRYVK5797", "title": "Japan · 100 MB · 7 days", "...": "..." }
}Errors#
Un id desconocido o descatalogado devuelve 404 eSIM not found. Si guardaste el producto, elimínalo de tu catálogo.
