GET Get all eSIMs
Tip: Use filtering options to narrow down your search results for company-specific or inventory-specific queries.
This endpoint returns a paginated list of all eSIMs with optional filtering by company and inventory.
Configure the API Endpoint
https://esim.betatel.com/api/v1/esim/sim-registries
- Method:
GET
Set Up the Headers
| Param | Value | Description |
|---|---|---|
| Content-Type | application/json | Specifies the payload format. |
| x-api-key | {{x-api-key}} | Your unique API key for secure access. |
| x-user-id | {{x-user-id}} | Your user identifier for added security and tracking. |
Query Parameters
Hint: Filters enable targeted retrieval of eSIMs, streamlining the management of multi-company deployments.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| count | integer | optional | 100 | Number of items to return |
| offset | integer | optional | 0 | Number of items to skip |
| company | integer | optional | - | Filter by company ID |
| inventory | integer | optional | - | Filter by inventory ID |
Example Response
Status Code: 200 OK
Content-Type: application/json
{
"total": 250,
"offset": 0,
"count": 20,
"sims": [
{
"iccid": "89148000004012345678",
"sim_status": "WAITING_FOR_ASSIGNMENT",
"group": {
"id": 1001,
"name": "Premium Group"
},
"inventory": {
"id": 12345,
"name": "US East Inventory"
},
"company": {
"id": 100,
"name": "Acme Corp"
},
"provisioned_date": 1640995200,
"terminated_date": 0,
"imsis": [
{
"sponsor_id": 200,
"imsi": 310260123456789
}
],
"mapped_imsi": 310260123456789
}
]
}
The response includes the total number of eSIMs available, current pagination offset, number of items returned, and an array of eSIM objects with detailed information including status, group, inventory, company, and IMSI data.
Code Snippets
Note: These snippets guide API interaction. Ensure all parameters and headers align with specified requirements.
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
curl --location 'https://esim.betatel.com/api/v1/esim/sim-registries' \
--header 'Accept: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'x-user-id: {{x-user-id}}'
import http.client
conn = http.client.HTTPSConnection("esim.betatel.com")
headers = {
'Accept': 'application/json',
'x-api-key': '{{x-api-key}}',
'x-user-id': '{{x-user-id}}'
}
conn.request("GET", "/api/v1/esim/sim-registries", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const axios = require('axios');
axios.get('https://esim.betatel.com/api/v1/esim/sim-registries', {
headers: {
'Accept': 'application/json',
'x-api-key': '{{x-api-key}}',
'x-user-id': '{{x-user-id}}'
},
params: {}
})
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://esim.betatel.com/api/v1/esim/sim-registries',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'x-api-key: {{x-api-key}}',
'x-user-id: {{x-user-id}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
HttpResponse<String> response = Unirest.get("https://esim.betatel.com/api/v1/esim/sim-registries")
.header("Accept", "application/json")
.header("x-api-key", "{{x-api-key}}")
.header("x-user-id", "{{x-user-id}}")
.asString();
System.out.println(response.getBody());
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://esim.betatel.com/api/v1/esim/sim-registries");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("x-api-key", "{{x-api-key}}");
request.Headers.Add("x-user-id", "{{x-user-id}}");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Error Handling
Important: Keep query parameters accurate to avoid general '400' errors related to bad requests.
- 400 - Bad Request - Invalid parameters
- 401 - Unauthorized - Invalid or missing API key