API belgeleri
iRoamly Shop API başvurusu: kimlik doğrulama, paketler, satın alma ve teslimat, yenileme ve kullanım.
Temel açıklama
Sunucu iletim bilgilerinin güvenliğini sağlamak için aşağıdaki güvenlik mekanizmaları kullanılır:
- 1.Tüm arayüzler veri aktarımı için
HTTPS securegüvenli bağlantı kullanır. - 2.API kimlik doğrulaması için kullanılan, size atanmış AuthKey (en fazla 32 karakter).
- 3.İstek hash’ini oluşturmak için kullanılan, size atanmış AuthSecret (en fazla 50 karakter).
- 4.İstekler, kimlik doğrulaması için SHA-256 hash’leri kullanır.
Arayüz standartları
https://api.iroamly.shop/HTTPSGET / POSTapplication/jsonİstek header parametreleri:
AuthKey: Müşteri kimlik doğrulama anahtarı, tür: dize (String)
Certification: Bu sırayla birleştirilmiş AuthKey+AuthSecret değerinin SHA-256 hash’ini içeren String.
/common/getPlanItem için AuthKey veya Certification header’ı gerekmez.
Bölgesel Paket Listesini Al
https://api.iroamly.shop/common/getPlanItemGETAuthKey veya Certification header’ı gerekmez.
İstek parametreleri:
Yanıt biçimi:
Başarılı: HTTP 200. Paketler data.list içinde döndürülür.
Her zaman HTTP 200 döndürür. Veri olmadığında data.list boş bir dizidir ve msg değeri Success olur.
Yanıt alanı açıklamaları:
"https://api.iroamly.shop/common/getPlanItem?region=US"{
"code": 0,
"data": {
list:[
{
"plan": "United States-eSIM-10GB-10 Days-Total",
"productCode": "iRoamly-unite-584535",
"data": "10GB",
"type": "Total",
"package_type": "Data Only",
"duration": "10",
"speed": "4G / 5G",
"operator": "T-Mobile/AT&T",
"region": "United States",
"region_index": "united-states",
"credit": 6.43,
"remark": "After accumulating 10GB, the speed will be reduced to 128 Kbps",
"created_at": "2025-05-16T04:02:31Z"
}
]
}
}Doğrudan QR kod satın alma
https://api.iroamly.shop/openapi/purchaseqrcodePOSTİstek parametreleri:
productList alanları:
iRoamly-Test-10GBSonraki adım: QR kodu almak için QR Kod Sorgula’yı (https://api.iroamly.shop/openapi/qrcodeQuery) kullanın
{
"email": "2m827n32d@gmail.com",
"productList": [
{
"plan": "United States-eSIM-10GB-10 Days-Total",
"quantity": 2
},
{
"plan": "Albania-10GB-15 Days-Total",
"quantity": 1
}
]
}{
"code": 1,
"data": {
"orderId": "Open-Global-DXDWFBKG578913",
"redeem_list": [
{
"productCode": "",
"plan": "United States-eSIM-10GB-10 Days-Total",
"redeemCode": "tjMxpYfvk5dFMQg",
"status": 0,
"expire_at": "2026-03-01"
},
{
"productCode": "",
"plan": "United States-eSIM-10GB-10 Days-Total",
"redeemCode": "gKPzYhseX1wRmSi",
"status": 0,
"expire_at": "2026-03-01"
},
{
"productCode": "",
"plan": "Albania-10GB-15 Days-Total",
"redeemCode": "sLSHNkAv2ojbNBG",
"status": 0,
"expire_at": "2026-03-01"
}
]
},
"msg": "success"
}Kullanım kodu satın al
https://api.iroamly.shop/openapi/purchaseCodePOSTİstek parametreleri:
productList alanları:
iRoamly-Test-10GB{
"email": "2m827n32d@gmail.com",
"productList": [
{
"plan": "United States-eSIM-10GB-10 Days-Total",
"quantity": 2
},
{
"plan": "Albania-10GB-15 Days-Total",
"quantity": 1
}
]
}{
"code": 1,
"msg": "success",
"orderId": "xxx-xxxx-sd9hn8df333" // Order number, can be used to query redeem code
}Kullanım kodu sorgula
https://api.iroamly.shop/openapi/codeQueryPOSTİstek parametreleri:
{
"orderId": "xxx-xxx-dh239jdu28",
}{
"code": 1,
"msg": "success",
"data": [
{
"productCode": "m8hed7h2fed",
"redeemCode": "3cd2m3f23f3f3",
"expire_at": "2024-06-30", // Expiry date
"plan": "United States-eSIM-10GB-10 Days-Total",
"status": 0
},
{
"productCode": "v2jf28dj2w",
"redeemCode": "d923j29ef2323",
"expire_at": "2024-06-30",
"plan": "Albania-10GB-15 Days-Total",
"status": 2
}
]
}QR koda dönüştür
(Not: QR kodlar, dönüştürmenin ardından belirtilen e-posta adresine gönderilir. Büyük toplu işlemlerin tamamlanması daha uzun sürebilir.)
https://api.iroamly.shop/openapi/redeemQRcodePOSTİstek parametreleri:
productList alanları:
{
"email": "2m827n32d@gmail.com",
"codeList": [
{
"redeemCode": "m8hed7h2fed",
},
{
"redeemCode": "cn88beg9edj",
}
]
}{
"code": 1,
"msg": "success",
}QR kod sorgula
https://api.iroamly.shop/openapi/qrcodeQueryPOSTİstek parametreleri:
Yanıt alanı açıklamaları:
{
"redeemCode": "m8hed7h2fed",
}{
"code": 1,
"msg": "success",
"redeemCode": "m8hed7h2fed",
"qrcode": "https://dsfjigewafe/qrcode.jpg"
}Yenileme paketi durumunu al
https://api.iroamly.shop/openapi/getRenewPlanStatusPOSTİstek parametreleri:
Yanıt alanı açıklamaları:
Yanıttaki üst düzey code, kullanım kodunun yenilenip yenilenemeyeceğini belirtir: 0 - yenileme mümkün, -1 - yenileme mümkün değil. Yenileme seçenekleri data.renewList içinde listelenir:
{
"redeemCode": "3cd2m3f23f3f3",
}{
"code": 0,
"data": {
"renewList": [
{
"renewtype": 1,
"starttime": "0001-01-01T00:00:00Z",
"endtime": "0001-01-01T00:00:00Z"
},
{
"renewtype": 2,
"starttime": "2025-08-04 06:13:08",
"endtime": "2025-09-20 14:23:51"
}
],
"lasttime": "0001-01-01T00:00:00Z"
},
"msg": "Success"
}Kod yenileme
(Not: Yenileme sırasında seçilen paketin yenileme grubu, orijinal paketin yenileme grubuyla eşleşmelidir.)
https://api.iroamly.shop/openapi/renewcodePOSTİstek parametreleri:
{
redeemCode: "DEF456UVW",
plan: "basic_yearly",
renewtype: 0,
renewtime: "2024-12-31T23:59:59Z"
}{
code: 1,
data: {
orderId: "Open-Global-DXDWFBKG578913",
plan: "United States-eSIM-10GB-10 Days-Total",
redeemCode: "tjMxpYfvk5dFMQg",
status: 0,
expire_at: "2026-03-01"
},
msg: "success"
}Paket istatistiklerini al
https://api.iroamly.shop/openapi/getnetworkflowGETİstek parametreleri:
Yanıt alanı açıklamaları:
{
code: 1,
status: 0,
flow_use: "300",
flow_total: "1024",
start_data: "2025-10-25T15:04:05Z07:00",
end_data: "2025-11-25T15:04:05Z07:00",
installDevice: "iPhone 15",
installCount: "1",
installTime: "2025-10-25T15:04:05Z06:00"
}{
code: -1,
msg: "error message"
}Yanıt durum kodu tanımları
Başarılı yanıtta code değeri 1 olur; yalnızca /common/getPlanItem ve /openapi/getRenewPlanStatus başarılı olduğunda code 0 döndürür.
Kullanım kodu durum tanımları
Kullanım kodu satın al (Python)
import requests
import json
import hashlib
# URL for the request
url = "https://api.iroamly.shop/openapi/purchaseCode"
# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE"
# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()
# Header parameters for the request
headers = {
"Content-Type": "application/json",
"AuthKey": auth_key,
"Certification": certification
}
# Example data for the request body
data = {
"email": "2m827n32d@gmail.com",
"productList": [
{
"productCode": "m8hed7h2fed2398dsnh",
"quantity": 2
},
{
"productCode": "cn88beg9edjdfj2sj0a",
"quantity": 1
}
]
}
# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Printing the response content
print(response.text)
# Example of response
{
"code":1,
"msg":"success",
"orderId":"xxx-xxxx-sd9hn8df333"
}
Kullanım kodu sorgula (Python)
import requests
import json
import hashlib
# URL for the request
url = "https://api.iroamly.shop/openapi/codeQuery"
# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE"
# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()
# Header parameters for the request
headers = {
"Content-Type": "application/json",
"AuthKey": auth_key,
"Certification": certification
}
# Example data for the request body
data = {
"orderId":"xxx-xxx-dh239jdu28"
}
# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Printing the response content
print(response.text)
# Example of response
{
"code":1,
"data":
[
{"productCode":"m8hed7h2fed2398dsnh","redeemCode":"nDb4TDCn6vMhbQv","status":0,"expire_at":"2024-07-04"},
{"productCode":"m8hed7h2fed2398dsnh","redeemCode":"oA7AWAmo76BwoGj","status":0,"expire_at":"2024-07-04"},
{"productCode":"cn88beg9edjdfj2sj0a","redeemCode":"XRdDeSxBVNbvCpU","status":0,"expire_at":"2024-07-04"}
],
"msg":"success"
}QR koda dönüştür (Python)
import requests
import json
import hashlib
# URL for the request
url = "https://api.iroamly.shop/openapi/redeemQRcode"
# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE"
# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()
# Header parameters for the request
headers = {
"Content-Type": "application/json",
"AuthKey": auth_key,
"Certification": certification
}
# Example data for the request body
data = {
"email": "2m827n32d@gmail.com",
"codeList": [
{
"redeemCode": "nDb4TDCn6vMhbQv",
},
{
"redeemCode": "XRdDeSxBVNbvCpU",
}
]
}
# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Printing the response content
print(response.text)
# Example of response
{"code":1,"msg":"success"}
QR kod sorgula (Python)
import requests
import json
import hashlib
# URL for the request
url = "https://api.iroamly.shop/openapi/qrcodeQuery"
# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE"
# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()
# Header parameters for the request
headers = {
"Content-Type": "application/json",
"AuthKey": auth_key,
"Certification": certification
}
# Example data for the request body
data = {
"redeemCode":"XRdDeSxBVNbvCpU"
}
# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))
# Printing the response content
print(response.text)
# Example of response
{
"code":1,
"qrcode":"https:/code.tokyoesim.com/20231220/1703048857317.65625d0a779f4598d55d77bda43ecd80.png",
"msg":"success",
"redeemCode":"XRdDeSxBVNbvCpU"
}