Purchase eSIM
curl --request POST \
--url https://api.dancity.app/api/v1/esim/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"packageCode": "NG-1GB-30D",
"customerRef": "ESIM-REF-001",
"iccid": "8960000000000000001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
packageCode: 'NG-1GB-30D',
customerRef: 'ESIM-REF-001',
iccid: '8960000000000000001'
})
};
fetch('https://api.dancity.app/api/v1/esim/purchase', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/esim/purchase"
payload = {
"packageCode": "NG-1GB-30D",
"customerRef": "ESIM-REF-001",
"iccid": "8960000000000000001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "eSIM purchased",
"data": {
"transactionId": "TXN-20260506-008",
"status": "SUCCESS",
"iccid": "8960000000000000001",
"activationCode": "LPA:1$smdp.example.com$ACTIVATION-CODE"
}
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}eSIM
Purchase eSIM
Purchase eSIM
POST
/
api
/
v1
/
esim
/
purchase
Purchase eSIM
curl --request POST \
--url https://api.dancity.app/api/v1/esim/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"packageCode": "NG-1GB-30D",
"customerRef": "ESIM-REF-001",
"iccid": "8960000000000000001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
packageCode: 'NG-1GB-30D',
customerRef: 'ESIM-REF-001',
iccid: '8960000000000000001'
})
};
fetch('https://api.dancity.app/api/v1/esim/purchase', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dancity.app/api/v1/esim/purchase"
payload = {
"packageCode": "NG-1GB-30D",
"customerRef": "ESIM-REF-001",
"iccid": "8960000000000000001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "eSIM purchased",
"data": {
"transactionId": "TXN-20260506-008",
"status": "SUCCESS",
"iccid": "8960000000000000001",
"activationCode": "LPA:1$smdp.example.com$ACTIVATION-CODE"
}
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Invalid API key or IP not allowlisted",
"statusCode": 401
}{
"success": false,
"message": "Sorry, something went wrong. Please try again later",
"statusCode": 500
}Body
application/json
Response
OK
