Partner API (B2B)
Product detail
GET /b2b/v1/products/:id — get one product by the id from search results.
Request#
GET
/b2b/v1/products/:idcurl "https://api.esimoa.com/b2b/v1/products/partner_9VKPYQ3JRYVK5797" \
-H "X-API-Key: $ESIMOA_PARTNER_KEY"const res = await fetch(`https://api.esimoa.com/b2b/v1/products/${encodeURIComponent(id)}`, {
headers: { 'X-API-Key': process.env.ESIMOA_PARTNER_KEY },
});
if (res.status === 404) {
// PRODUCT_NOT_FOUND — no longer on sale, remove it from your catalog
}
const { data: product } = await res.json();res = requests.get(
f"https://api.esimoa.com/b2b/v1/products/{product_id}",
headers={"X-API-Key": os.environ["ESIMOA_PARTNER_KEY"]},
timeout=10,
)
if res.status_code == 404:
... # PRODUCT_NOT_FOUND — no longer on sale
product = res.json()["data"]id is the id from product search results (it starts with partner_).
Response#
data is a single PartnerProduct object.
200 OKjson
{
"success": true,
"data": { "id": "partner_9VKPYQ3JRYVK5797", "name": "Japan Unlimited 5일", "...": "..." }
}Errors#
A malformed id, an unknown id, or a product esimoa no longer sells directly returns 404 PRODUCT_NOT_FOUND. Remove it from your stored catalog.
404 Not Foundjson
{ "statusCode": 404, "code": "PRODUCT_NOT_FOUND", "message": "Product not found." }