List eSIM packages
List the eSIM packages your agency can sell, with prices in your agency currency.
/api/v1/esims/packagesFilter by country (a slug such as france). The unfiltered catalog is about 4 MB, has no pagination and is the slowest call of the eSIM API, so send country whenever you can and accept compressed responses. English text is served from a cache that is refreshed about every 50 minutes. Another locale is fetched from the supplier on its first call (about 10 seconds) and then cached for an hour.
Regional and worldwide bundles are global packages whose country_slug is the region (for example europe). A 202 means the catalog is still loading after a restart: wait a few seconds and send the call again.
Four amounts describe each package: base_price, retail_price, balance_debit_amount and agency_commission. Read the pricing guide before you compute anything from them.
curl 'https://api.fx-port.com/api/v1/esims/packages?country=france&type=local' \
-H "Authorization: Bearer fxp_test_YOUR_KEY"{
"environment": "sandbox",
"success": true,
"endpoint": "/packages",
"data": [
{
"id": "france-in-7days-1gb",
"package_id": "france-in-7days-1gb",
"type": "sim",
"price": 402.5,
"base_price": 402.5,
"amount": 1024,
"day": 7,
"is_unlimited": false,
"title": "1 GB - 7 days",
"is_fair_usage_policy": false,
"fair_usage_policy": null,
"data": "1 GB",
"voice": null,
"text": null,
"country_name": "France",
"country_code": "FR",
"country_slug": "france",
"country_image_url": "https://cdn-revamp.airalo.com/images/9753dedb-d495-47cf-b6e4-82e555564743.png",
"operator_name": "KPN France Data only",
"operator_id": 1704,
"operator_style": "dark",
"operator_gradient_start": "#F1D4FB",
"operator_gradient_end": "#EEC0FF",
"operator_type": "local",
"operator_is_prepaid": false,
"operator_esim_type": "Prepaid",
"operator_warning": null,
"operator_apn_type": "automatic",
"operator_is_roaming": true,
"operator_info": [
"Data-only eSIM.",
"Rechargeable online with no expiry."
],
"operator_image_url": "https://cdn-revamp.airalo.com/images/01b47d41-fbb4-4032-8f5a-d1ca6a0f3688.png",
"operator_plan_type": "data",
"operator_activation_policy": "first-usage",
"operator_is_kyc_verify": false,
"operator_rechargeability": true,
"operator_other_info": "Covers metropolitan (mainland) France and Corsica. Does not include overseas territories (Guadeloupe, Martinique, Reunion, ...",
"operator_coverages": [
{
"name": "FR",
"code": "FR",
"networks": [
{
"name": "Orange",
"types": [
"5G"
]
}
]
}
],
"operator_apn": {
"ios": {
"apn_type": "automatic",
"apn_value": null
},
"android": {
"apn_type": "automatic",
"apn_value": null
}
},
"is_regional": false,
"is_global": false,
"retail_price": 468.84,
"total_price": 468.84,
"balance_debit_amount": 418.6,
"b2b_price": 418.6,
"agency_commission": "12 %",
"commission_rate": 12,
"currency": "DZD",
"supplier_currency": "USD",
"exchange_rate": 250
},
{
"id": "france-in-15days-2gb",
"package_id": "france-in-15days-2gb",
"type": "sim",
"price": 547.5,
"base_price": 547.5,
"amount": 2048,
"day": 15,
"is_unlimited": false,
"title": "2 GB - 15 days",
"is_fair_usage_policy": false,
"fair_usage_policy": null,
"data": "2 GB",
"voice": null,
"text": null,
"country_name": "France",
"country_code": "FR",
"country_slug": "france",
"country_image_url": "https://cdn-revamp.airalo.com/images/9753dedb-d495-47cf-b6e4-82e555564743.png",
"operator_name": "KPN France Data only",
"operator_id": 1704,
"operator_style": "dark",
"operator_gradient_start": "#F1D4FB",
"operator_gradient_end": "#EEC0FF",
"operator_type": "local",
"operator_is_prepaid": false,
"operator_esim_type": "Prepaid",
"operator_warning": null,
"operator_apn_type": "automatic",
"operator_is_roaming": true,
"operator_info": [
"Data-only eSIM.",
"Rechargeable online with no expiry."
],
"operator_image_url": "https://cdn-revamp.airalo.com/images/01b47d41-fbb4-4032-8f5a-d1ca6a0f3688.png",
"operator_plan_type": "data",
"operator_activation_policy": "first-usage",
"operator_is_kyc_verify": false,
"operator_rechargeability": true,
"operator_other_info": "Covers metropolitan (mainland) France and Corsica. Does not include overseas territories (Guadeloupe, Martinique, Reunion, ...",
"operator_coverages": [
{
"name": "FR",
"code": "FR",
"networks": [
{
"name": "Orange",
"types": [
"5G"
]
}
]
}
],
"operator_apn": {
"ios": {
"apn_type": "automatic",
"apn_value": null
},
"android": {
"apn_type": "automatic",
"apn_value": null
}
},
"is_regional": false,
"is_global": false,
"retail_price": 637.73,
"total_price": 637.73,
"balance_debit_amount": 569.4,
"b2b_price": 569.4,
"agency_commission": "12 %",
"commission_rate": 12,
"currency": "DZD",
"supplier_currency": "USD",
"exchange_rate": 250
}
],
"meta": {
"total_packages": 12,
"filters_applied": {
"country": "france",
"type": "local"
},
"locale": "en",
"agency_currency": "DZD",
"currency": "DZD",
"supplier_currency": "USD",
"exchange_rate": 250,
"commission_percentage": "12 %",
"commission_rate": 12
}
}{
"environment": "sandbox",
"success": false,
"message": "No cached packages available. Package fetcher may still be loading initial data.",
"data": [],
"meta": {}
}Request
Query parameters
countrystringCountry slug, for example france or turkey. Regions have their own slug, for example europe. A country name as people write it is read as its slug (United States is united-states, Bosnia & Herzegovina is bosnia-and-herzegovina); case and accents do not matter. An unknown slug or a name that matches no slug returns an empty list.
At most 64 characters.
typestringScope of the package: local is one country, global is every regional and worldwide bundle. Any other well-formed value returns an empty list: there is no regional value.
At most 32 characters.
filter[type]stringdeprecatedLegacy name, still accepted. Use type instead.
Previous name of type. It still works and the response carries a deprecated_field warning.
At most 32 characters.
localestringLanguage of the text fields. Without it the Accept-Language header is used, then en. Any spelling of a locale is read and only its language counts: fr, fr-CA, zh-Hans, pt_BR, fr_FR.UTF-8, or a whole Accept-Language value such as fr-FR,fr;q=0.9 (the first language is used). Supported: en, fr, ar, de, es, it, ja, ko, pl, pt, ro, ru, sq, tr, vi, zh. Another well-formed language is answered in English and the response carries a coerced_value warning.
At most 80 characters.
Response
200The packages that match the filters.
successbooleantrue when the catalog was returned.
endpointstringThe route that answered, /.
dataarray of EsimPackageThe packages that match the filters. Not paginated: filter by country.
metaobjectFacts about the catalog response.
ShowHide 9 attributes
total_packagesintegerNumber of packages in data, after the filters.
filters_appliedobjectThe filters the request applied.
ShowHide 2 attributes
countrystringnullableThe country filter, or null.
typestringnullableThe type filter, or null.
localestringLanguage used for the text fields of this response.
agency_currencystringdeprecatedLegacy name, still accepted. Use currency instead.
Currency of every amount: the settlement currency of your agency. The older name of currency: same value, use currency.
currencystringCurrency of every amount: the settlement currency of your agency. The snake_case twin of agency_currency, with the same value: use this name.
supplier_currencystringCurrency the supplier prices packages in.
exchange_ratenumberRate used to convert supplier_currency to your agency currency.
commission_percentagestringYour commission rate as text, for example 12 %.
commission_ratenumberYour commission rate as a number: 12 for a standard agency, 0 for a contracted corporate agency.
202The catalog is still loading after a restart. success is false and data is empty: retry in a few seconds.
successbooleanAlways false: the data is not available yet.
messagestringWhat is missing and that it is still loading.
dataarray of objectAlways empty.
metaobjectEmpty for a catalog that is loading.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | invalid_country | country must be a country slug such as france (received 'France!'). |
| 400 | invalid_locale | locale must be a language code such as en, fr or ar (received '12'). |
The shape of the error body depends on the endpoint. See Errors for every shape and code.