API दस्तावेज़
iRoamly Shop API का संदर्भ: प्रमाणीकरण, प्लान, खरीद और डिलीवरी, रिन्यूअल और उपयोग।
बुनियादी जानकारी
सर्वर पर भेजी जाने वाली जानकारी की सुरक्षा सुनिश्चित करने के लिए, निम्नलिखित सुरक्षा तंत्र अपनाए गए हैं:
- 1.सभी इंटरफ़ेस
HTTPS secureसुरक्षित कनेक्शन पर डेटा भेजते हैं। - 2.आपको दी गई AuthKey, जिसका इस्तेमाल API प्रमाणीकरण के लिए होता है (अधिकतम लंबाई: 32 अक्षर)।
- 3.आपको दी गई AuthSecret, जिसका इस्तेमाल अनुरोध का हैश बनाने के लिए होता है (अधिकतम लंबाई: 50 अक्षर)।
- 4.अनुरोध प्रमाणीकरण के लिए SHA-256 हैश का इस्तेमाल करते हैं।
इंटरफ़ेस मानक
https://api.iroamly.shop/HTTPSGET / POSTapplication/jsonअनुरोध हेडर पैरामीटर:
AuthKey: ग्राहक प्रमाणीकरण कुंजी, प्रकार स्ट्रिंग (String)
Certification: String, जिसमें AuthKey+AuthSecret को इसी क्रम में जोड़कर बनाया गया SHA-256 हैश होता है।
/common/getPlanItem के लिए AuthKey या Certification हेडर की ज़रूरत नहीं है।
रीजनल प्लान सूची प्राप्त करें
https://api.iroamly.shop/common/getPlanItemGETकिसी AuthKey या Certification हेडर की ज़रूरत नहीं है।
अनुरोध पैरामीटर:
रिस्पॉन्स फ़ॉर्मैट:
सफलता: HTTP 200। प्लान data.list में लौटाए जाते हैं।
हमेशा HTTP 200 लौटाता है। जब कोई डेटा उपलब्ध नहीं होता, तो data.list एक खाली array होता है और msg Success होता है।
रिस्पॉन्स फ़ील्ड का विवरण:
"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"
}
]
}
}सीधे QR कोड खरीदें
https://api.iroamly.shop/openapi/purchaseqrcodePOSTअनुरोध पैरामीटर:
productList फ़ील्ड:
iRoamly-Test-10GBअगला चरण: QR कोड पाने के लिए QR कोड क्वेरी करें (https://api.iroamly.shop/openapi/qrcodeQuery) का इस्तेमाल करें
{
"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"
}रिडीम कोड खरीदें
https://api.iroamly.shop/openapi/purchaseCodePOSTअनुरोध पैरामीटर:
productList फ़ील्ड:
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
}रिडीम कोड क्वेरी करें
https://api.iroamly.shop/openapi/codeQueryPOSTअनुरोध पैरामीटर:
{
"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 कोड में कन्वर्ट करें
(नोट: कन्वर्ज़न के बाद QR कोड निर्दिष्ट ईमेल पते पर भेजे जाते हैं। बड़े बैच को प्रोसेस होने में ज़्यादा समय लग सकता है।)
https://api.iroamly.shop/openapi/redeemQRcodePOSTअनुरोध पैरामीटर:
productList फ़ील्ड:
{
"email": "2m827n32d@gmail.com",
"codeList": [
{
"redeemCode": "m8hed7h2fed",
},
{
"redeemCode": "cn88beg9edj",
}
]
}{
"code": 1,
"msg": "success",
}QR कोड क्वेरी करें
https://api.iroamly.shop/openapi/qrcodeQueryPOSTअनुरोध पैरामीटर:
रिस्पॉन्स फ़ील्ड का विवरण:
{
"redeemCode": "m8hed7h2fed",
}{
"code": 1,
"msg": "success",
"redeemCode": "m8hed7h2fed",
"qrcode": "https://dsfjigewafe/qrcode.jpg"
}रिन्यूअल प्लान की स्थिति प्राप्त करें
https://api.iroamly.shop/openapi/getRenewPlanStatusPOSTअनुरोध पैरामीटर:
रिस्पॉन्स फ़ील्ड का विवरण:
रिस्पॉन्स का शीर्ष-स्तरीय code बताता है कि रिडीम कोड रिन्यू किया जा सकता है या नहीं: 0 - रिन्यूअल संभव, -1 - रिन्यूअल संभव नहीं। रिन्यूअल विकल्प data.renewList में दिए गए हैं:
{
"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"
}रिन्यूअल कोड
(नोट: रिन्यू करते समय, चुने गए प्लान का रिन्यूअल ग्रुप मूल प्लान के रिन्यूअल ग्रुप से मेल खाना चाहिए।)
https://api.iroamly.shop/openapi/renewcodePOSTअनुरोध पैरामीटर:
{
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"
}प्लान के आँकड़े प्राप्त करें
https://api.iroamly.shop/openapi/getnetworkflowGETअनुरोध पैरामीटर:
रिस्पॉन्स फ़ील्ड का विवरण:
{
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"
}रिस्पॉन्स स्टेटस कोड परिभाषाएँ
सफलता पर code 1 होता है, सिवाय /common/getPlanItem और /openapi/getRenewPlanStatus के, जो सफलता पर code 0 लौटाते हैं।
रिडीम कोड स्थिति परिभाषाएँ
रिडीम कोड खरीदें (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"
}
रिडीम कोड क्वेरी करें (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 कोड में कन्वर्ट करें (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 कोड क्वेरी करें (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"
}