GET Get eUICC Profile
Info: Retrieve detailed profile information for diagnostics and management. Verify the ICCID to ensure accuracy.
This endpoint returns the eUICC (embedded Universal Integrated Circuit Card) profile information for a specific ICCID.
Configure the API Endpoint
https://esim.betatel.com/api/v1/esim/euicc-profiles/{{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
| Param | Type | Required | Description |
|---|---|---|---|
| iccid | string | required | The ICCID of the eSIM |
Example Response
Info: The response encompasses all assigned values including the profile class and state, aiding in thorough diagnostics and management.
Status Code: 200 OK
Content-Type: application/json
Example Response
{
"profile": {
"iccid": "89148000004012345678",
"eid": "example_eid_string",
"status": "enabled",
"profile_class": "operational",
"state": "enabled",
"nickname": "Primary Profile"
}
}
The response includes the profile object containing detailed eUICC profile information including EID, status, and configuration details.
Code Snippets
Caution: While using code snippets, customize header content with actual API key and user ID to access full features.
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
Example - cURL
curl --location 'https://esim.betatel.com/api/v1/esim/euicc-profiles/{{iccid}}' \
--header 'Accept: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'x-user-id: {{x-user-id}}'
Example - Python
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/euicc-profiles/{iccid}", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example - Node.js
const axios = require('axios');
const iccid = "example_iccid";
axios.get(`https://esim.betatel.com/api/v1/esim/euicc-profiles/${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);
});
Example - PHP
<?php
$curl = curl_init();
$iccid = "example_iccid";
curl_setopt_array($curl, array(
CURLOPT_URL => "https://esim.betatel.com/api/v1/esim/euicc-profiles/$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;
Example - Java
String iccid = "example_iccid";
HttpResponse<String> response = Unirest.get("https://esim.betatel.com/api/v1/esim/euicc-profiles/" + 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());
Example - C#
var client = new HttpClient();
var iccid = "example_iccid";
var request = new HttpRequestMessage(HttpMethod.Get, $"https://esim.betatel.com/api/v1/esim/euicc-profiles/{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
Important: Ensure the ICCID is correct to avoid getting a '404' Not Found error.
- 404 - Not Found - eSIM profile not found for specified ICCID