API 문서
iRoamly Shop API 참조: 인증, 요금제, 구매 및 전달, 갱신 및 사용량.
기본 설명
서버 전송 정보의 보안을 위해 다음 보안 메커니즘을 적용합니다:
- 1.모든 인터페이스는
HTTPS secure보안 연결을 통해 통신합니다. - 2.API 인증에 사용하는 발급된 AuthKey(최대 32자).
- 3.요청 해시 생성에 사용하는 발급된 AuthSecret(최대 50자).
- 4.요청 인증에는 SHA-256 해시를 사용합니다.
인터페이스 규격
https://api.iroamly.shop/HTTPSGET / POSTapplication/json요청 헤더 파라미터:
AuthKey: 고객 인증 키, 문자열(String) 유형
Certification: AuthKey+AuthSecret을 이 순서대로 이어 붙인 값의 SHA-256 해시를 담은 문자열.
/common/getPlanItem에는 AuthKey 또는 Certification 헤더가 필요하지 않습니다.
지역별 요금제 목록 조회
https://api.iroamly.shop/common/getPlanItemGETAuthKey 또는 Certification 헤더가 필요하지 않습니다.
요청 파라미터:
응답 형식:
성공: HTTP 200. 요금제는 data.list로 반환됩니다.
항상 HTTP 200을 반환합니다. 데이터가 없으면 data.list는 빈 배열이고 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 코드 조회(https://api.iroamly.shop/openapi/qrcodeQuery)로 QR 코드를 가져오세요
{
"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"
}