GET Get eSIM by ICCID
Note: Use this endpoint to quickly validate or check the status of an eSIM by its ICCID. Important for account audits.
This endpoint validates and returns eSIM information for a specific ICCID (Integrated Circuit Card Identifier).
Configure the API Endpoint
https://esim.betatel.com/api/v1/esim/sim-registries/{{iccid}}
- 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. |
Path Parameters
Important: Accurate input of the ICCID path parameter ensures successful retrieval of eSIM details, which is critical for validation.
| Param | Type | Required | Description |
|---|---|---|---|
| iccid | string | required | The ICCID of the eSIM to retrieve |
Example Response
Status Code: 200 OK
Content-Type: application/json
{
"iccid": "89148000004012345678",
"status": "active",
"inventory_id": 51952,
"created_date": 1761330317000,
"profile_data": {
"eid": "example_eid",
"status": "enabled"
}
}
The response includes the iccid - the requested ICCID, status - current status of the eSIM, inventory_id - associated inventory identifier, and profile_data - eSIM profile information.
Code Snippets
Note: By following these snippets, you gain direct access to a specific eSIM object and can examine relevant attributes.
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
curl --location 'https://esim.betatel.com/api/v1/esim/sim-registries/{{iccid}}' \
--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}}'
}
iccid = "example_iccid"
conn.request("GET", f"/api/v1/esim/sim-registries/{iccid}", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const axios = require('axios');
const iccid = "example_iccid";
axios.get(`https://esim.betatel.com/api/v1/esim/sim-registries/${iccid}`, {
headers: {
'Accept': 'application/json',
'x-api-key': '{{x-api-key}}',
'x-user-id': '{{x-user-id}}'
}
})
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
$iccid = "example_iccid";
curl_setopt_array($curl, array(
CURLOPT_URL => "https://esim.betatel.com/api/v1/esim/sim-registries/$iccid",
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;
String iccid = "example_iccid";
HttpResponse<String> response = Unirest.get("https://esim.betatel.com/api/v1/esim/sim-registries/" + iccid)
.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 iccid = "example_iccid";
var request = new HttpRequestMessage(HttpMethod.Get, $"https://esim.betatel.com/api/v1/esim/sim-registries/{iccid}");
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
Caution: Enter the ICCID correctly to avoid '404' errors. Malformed requests will trigger a '400' status code.
- 404 - Not Found - eSIM with specified ICCID does not exist
- 400 - Bad Request - Invalid ICCID format
- 401 - Unauthorized - Invalid or missing API key