Get plan details
const url = 'https://api.roamex.com/v1/plans/details?lang=nl';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"planId":"00000000-0000-4000-8000-0000000000b1"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.roamex.com/v1/plans/details?lang=nl' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "planId": "00000000-0000-4000-8000-0000000000b1" }'Returns one plan with your price and, for a regional plan, the countries it covers. Plans that /plans leaves out because a better plan replaces them, or because they are not listed on the API, still resolve here.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Language of plan and destination names in the response: en, nl, es, de, it, fr, pl, pt, tr, el, cs or ro. Any other value, or none, gives English. It never changes which items are returned or any figure.
Example
nlRequest Bodyrequired
Section titled “Request Bodyrequired”object
A plan id from /plans.
Example
{ "planId": "00000000-0000-4000-8000-0000000000b1"}Responses
Section titled “Responses”The plan.
object
object
object
Regional plans only.
object
object
0 when unknown.
Two decimals in GB, whole numbers in MB and KB, 0 B when unknown.
A day pass.
object
The full-speed data per day.
object
0 when unknown.
Two decimals in GB, whole numbers in MB and KB, 0 B when unknown.
object
true for a day pass: you choose the days with days on /esims/purchase.
Day passes only. Always 1.
Day passes only. Always 60.
Your price. For a fixed-data plan it is what /esims/purchase charges per eSIM. For a day pass it is a one-day rate, with perDay and note; the total for several days is not this rate times the days, and /esims/purchase returns it.
object
Euro cents.
Present on day passes only.
Present on day passes only.
object
When the validity period starts: at installation on a device, or at the first connection to a network. null when unknown.
The plan must be activated within this many days. null when unknown.
Example
{ "success": true, "plan": { "id": "00000000-0000-4000-8000-0000000000b2", "name": "Japan · Unlimited (2 GB/day)", "region": { "code": "JP", "name": "Japan", "isRegional": false }, "data": { "unlimited": true, "perDay": { "bytes": 2147483648, "formatted": "2.00 GB" } }, "validity": { "days": 1, "unit": "DAY", "configurable": true, "minDays": 1, "maxDays": 60 }, "price": { "amount": 290, "currency": "EUR", "formatted": "€2.90", "perDay": true, "note": "Per-day rate (1-day price). Multi-day totals are discounted (not price × days) and capped at 60 days; call /esims/purchase for the exact total." }, "type": "unlimited", "supportsTopUp": true, "activation": { "startsOn": "first_connection", "activateWithinDays": 180 } }}Headers
Section titled “Headers”Calls allowed per minute for this endpoint group.
Calls left in the current minute.
When the current window ends, in Unix seconds.
INVALID_JSON: the body is missing or not a JSON object.MISSING_PLAN_ID:planIdis missing.PLAN_NOT_AVAILABLE: the plan has no price.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}AUTH_ERROR: the key is missing, malformed, unknown or revoked. The message says which, for example Missing Authorization header, Invalid Authorization header format. Use: Bearer <api_key>, Invalid API key format or Invalid API key.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false, "error": { "code": "AUTH_ERROR", "message": "Invalid API key" }}AUTH_ERROR: the account is suspended (Your account is suspended. Please contact support.) or rejected (Account is not approved for API access).
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}PLAN_NOT_FOUND: no active, sellable plan has this id.NOT_FOUND: the API is switched off on the platform.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}PAYLOAD_TOO_LARGE: the Content-Length header is over 100 KB.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}RATE_LIMITED: the account’s per-minute budget for this endpoint group is used up, or too many refused keys came from this IP address. Wait the Retry-After seconds.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false, "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded. Please wait 42 seconds before retrying." }}Headers
Section titled “Headers”Calls allowed per minute for this endpoint group.
Calls left in the current minute.
When the current window ends, in Unix seconds.
Seconds to wait before retrying.
INTERNAL_ERROR: an unexpected error on our side.AUTH_ERRORwith status 500: the key could not be checked because of an error on our side. Retry with backoff.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}Transient. Retry with backoff.
PRICING_UNAVAILABLE: your account pricing could not be confirmed.
object
object
Machine-readable. Branch on this.
A sentence for people. It can change.
Example
{ "success": false}
