Get Regions
curl --request GET \
--url https://api.vellosim.com/api/esim/regions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.vellosim.com/api/esim/regions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vellosim.com/api/esim/regions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellosim.com/api/esim/regions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vellosim.com/api/esim/regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"regionCode": "US",
"regionName": "United States",
"regionType": "LC",
"countryCode": "US",
"flagUrl": "https://flagcdn.com/w320/us.png",
"packageCount": 15
},
{
"regionCode": "GB",
"regionName": "United Kingdom",
"regionType": "LC",
"countryCode": "GB",
"flagUrl": "https://flagcdn.com/w320/gb.png",
"packageCount": 12
},
{
"regionCode": "EU",
"regionName": "Europe",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/eu.png",
"packageCount": 20
},
{
"regionCode": "ASIA",
"regionName": "Asia Pacific",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/asia.png",
"packageCount": 18
},
{
"regionCode": "GLOBAL",
"regionName": "Global Coverage",
"regionType": "GL",
"countryCode": null,
"flagUrl": "https://example.com/flags/global.png",
"packageCount": 8
}
]
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "INVALID_TOKEN",
"details": "Invalid or expired authentication token"
}
}
eSIM
Get Regions
Get all available regions (countries & continents) for eSIM packages
GET
/
api
/
esim
/
regions
Get Regions
curl --request GET \
--url https://api.vellosim.com/api/esim/regions \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.vellosim.com/api/esim/regions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vellosim.com/api/esim/regions"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellosim.com/api/esim/regions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vellosim.com/api/esim/regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"regionCode": "US",
"regionName": "United States",
"regionType": "LC",
"countryCode": "US",
"flagUrl": "https://flagcdn.com/w320/us.png",
"packageCount": 15
},
{
"regionCode": "GB",
"regionName": "United Kingdom",
"regionType": "LC",
"countryCode": "GB",
"flagUrl": "https://flagcdn.com/w320/gb.png",
"packageCount": 12
},
{
"regionCode": "EU",
"regionName": "Europe",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/eu.png",
"packageCount": 20
},
{
"regionCode": "ASIA",
"regionName": "Asia Pacific",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/asia.png",
"packageCount": 18
},
{
"regionCode": "GLOBAL",
"regionName": "Global Coverage",
"regionType": "GL",
"countryCode": null,
"flagUrl": "https://example.com/flags/global.png",
"packageCount": 8
}
]
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "INVALID_TOKEN",
"details": "Invalid or expired authentication token"
}
}
Endpoint
GET /api/esim/regions
Description
This endpoint returns a list of all available regions where eSIM packages can be purchased. Regions can be individual countries or multi-country/continental packages.Authentication
string
required
API Key for authentication
YOUR_API_KEY
Query Parameters
number
Filter by region type:
1- Countries only (single country packages)2- Continents/Multi-country packages only
Response
array
Array of region objects
Show Region Object
Show Region Object
string
Unique code for the region (e.g., “US”, “EU”, “ASIA”)
string
Display name of the region
string
Type of region:
LC (Local/Country), RG (Regional), GL (Global)string
ISO country code (for country-specific regions)
string
URL to the region’s flag image
number
Number of available packages for this region
Example Request
curl -X GET 'https://api.vellosim.com/api/esim/regions?type=1' \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
//Get all regions
const response = await fetch('https://api.vellosim.com/api/esim/regions', {
method: 'GET',
headers: {
'X-API-Key': ' YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log('Available regions:', data);
// Get only countries
const countriesResponse = await fetch(
'https://api.vellosim.com/api/esim/regions?type=1',
{
method: 'GET',
headers: {
'X-API-Key': ' YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
const countries = await countriesResponse.json();
console.log('Countries:', countries);
import requests
headers = {
'X-API-Key': ' YOUR_API_KEY',
'Content-Type': 'application/json'
}
# Get all regions
response = requests.get(
'https://api.vellosim.com/api/esim/regions',
headers=headers
)
data = response.json()
print(f"Available regions: {len(data)}")
# Get only multi-country packages
params = {'type': 2}
response = requests.get(
'https://api.vellosim.com/api/esim/regions',
headers=headers,
params=params
)
multi_country = response.json()
print(f"Multi-country packages: {len(multi_country)}")
<?php
$apiKey = 'YOUR_API_KEY';
// Get all regions
$ch = curl_init('https://api.vellosim.com/api/esim/regions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$regions = json_decode($response, true);
curl_close($ch);
echo "Available regions: " . count($regions);
// Get only countries
$ch = curl_init('https://api.vellosim.com/api/esim/regions?type=1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$countries = json_decode($response, true);
curl_close($ch);
echo "\nCountries: " . count($countries);
?>
Example Response
[
{
"regionCode": "US",
"regionName": "United States",
"regionType": "LC",
"countryCode": "US",
"flagUrl": "https://flagcdn.com/w320/us.png",
"packageCount": 15
},
{
"regionCode": "GB",
"regionName": "United Kingdom",
"regionType": "LC",
"countryCode": "GB",
"flagUrl": "https://flagcdn.com/w320/gb.png",
"packageCount": 12
},
{
"regionCode": "EU",
"regionName": "Europe",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/eu.png",
"packageCount": 20
},
{
"regionCode": "ASIA",
"regionName": "Asia Pacific",
"regionType": "RG",
"countryCode": null,
"flagUrl": "https://example.com/flags/asia.png",
"packageCount": 18
},
{
"regionCode": "GLOBAL",
"regionName": "Global Coverage",
"regionType": "GL",
"countryCode": null,
"flagUrl": "https://example.com/flags/global.png",
"packageCount": 8
}
]
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "INVALID_TOKEN",
"details": "Invalid or expired authentication token"
}
}
Region Types
| Type | Code | Description | Example |
|---|---|---|---|
| Local | LC | Single country coverage | United States, Japan, France |
| Regional | RG | Multiple countries in a region | Europe, Asia Pacific, Caribbean |
| Global | GL | Worldwide coverage | Global eSIM packages |
Use Cases
Display Country Selector
Display Country Selector
Use this endpoint to populate a country/region selector in your UI:
async function loadRegions() {
const regions = await fetch('/api/esim/regions?type=1', {
headers: { 'X-API-Key': ' YOUR_API_KEY' }
}).then(r => r.json());
const selector = document.getElementById('country-select');
regions.forEach(region => {
const option = document.createElement('option');
option.value = region.regionCode;
option.text = region.regionName;
selector.appendChild(option);
});
}
Show Package Availability
Show Package Availability
Display which regions have available packages:
const regions = await getRegions();
const availableRegions = regions.filter(r => r.packageCount > 0);
console.log(`${availableRegions.length} regions have available packages`);
Separate Countries and Regional Packages
Separate Countries and Regional Packages
Create different sections for single-country and multi-country packages:
const countries = await fetch('/api/esim/regions?type=1', {
headers: { 'X-API-Key': ' YOUR_API_KEY' }
}).then(r => r.json());
const multiCountry = await fetch('/api/esim/regions?type=2', {
headers: { 'X-API-Key': ' YOUR_API_KEY' }
}).then(r => r.json());
displayCountries(countries);
displayRegionalPackages(multiCountry);
Next Steps
Get Packages
View available eSIM packages for a region
Top Destinations
Get popular destinations with featured packages
Purchase eSIM
Buy an eSIM package
Integration Guide
Learn how to build a region selector
⌘I
