eSIM Exchange Business Integration API Specification v1.2
Basic Explanation
To ensure the security of server transmission information, the following security mechanisms are adopted:
- All interfaces use
HTTPS secure
links. - Officially assigned customer authentication AuthKey, used for authorization and encryption, with a maximum length of 32.
- Officially assigned encryption key AuthSecret, used for encryption, with a maximum length of 50.
- Ensures the security of requests through SHA-256.
Interface Standards
Base Path:
https://api.iroamly.shop/
Request Protocol:
HTTPS
Request Method:
GET / POST
Data Transfer Format:
application/json
Request Header Parameters:
AuthKey: Customer authentication key, type String
Certification: Encrypted string, type String (Result of SHA-256 encryption of accumulated AuthKey+AuthSecret)
Purchase Redeem Code
Request URL:
https://api.iroamly.shop/openapi/purchaseCode
Request Method:
POST
Request Parameters:
Parameter | Description | Type |
---|---|---|
String | ||
productList | Product collection | Object[] |
productList Fields:
Field | Description | Type |
---|---|---|
productCode | Product code | String |
quantity | Quantity | Int |
Example Parameters
{
"email": "2m827n32d@gmail.com",
"productList": [
{
"productCode": "m8hed7h2fed",
"quantity": 2
},
{
"productCode": "cn88beg9edj",
"quantity": 1
}
]
}
Example Return
{
"code": 1,
"msg": "success",
"orderId": "xxx-xxxx-sd9hn8df333" // Order number, can be used to query redeem code
}
Query Redeem Code
Request URL:
https://api.iroamly.shop/openapi/codeQuery
Request Parameters:
Parameter | Description | Type |
---|---|---|
orderId | Order number | String |
Example Parameters
{
"orderId": "xxx-xxx-dh239jdu28",
}
Example Return
{
"code": 1,
"msg": "success",
"data": [
{
"productCode": "m8hed7h2fed",
"redeemCode": "3cd2m3f23f3f3",
"expire_at": "2024-06-30", // Expiry date
"status": 0
},
{
"productCode": "v2jf28dj2w",
"redeemCode": "d923j29ef2323",
"expire_at": "2024-06-30",
"status": 2
}
]
}
Redeem QR Code
(Note: Will be sent to the specified email, the more you redeem, the longer the waiting time)
Request URL:
https://api.iroamly.shop/openapi/redeemQRcode
Request Parameters:
Parameter | Description | Type |
---|---|---|
String | ||
codeList | Collection of redeem codes | Object[] |
productList Fields:
Field | Description | Type |
---|---|---|
redeemCode | Redeem code | String |
Example Parameters
{
"email": "2m827n32d@gmail.com",
"codeList": [
{
"redeemCode": "m8hed7h2fed",
},
{
"redeemCode": "cn88beg9edj",
}
]
}
Example Return
{
"code": 1,
"msg": "success",
}
Query QR Code
Request URL:
https://api.iroamly.shop/openapi/qrcodeQuery
Request Parameters:
Parameter | Description | Type |
---|---|---|
code | Redeem code | String |
Example Parameters
{
"redeemCode": "m8hed7h2fed",
}
Example Return
{
"code": 1,
"msg": "success",
"redeemCode": "m8hed7h2fed",
"qrcode": "https://dsfjigewafe/qrcode.jpg"
}
Response Status Code Definitions
Code | Description |
---|---|
1 | Success |
2 | Request parameter authentication failed |
3 | Parameters not filled as required |
4 | Product code does not exist |
5 | Insufficient balance |
6 | Insufficient balance |
7 | Redeem code has been redeemed or does not exist |
-1 | Request failed |
Redeem Code Status Definitions
Status | Description |
---|---|
0 | Not redeemed |
1 | Redeeming |
2 | Redeemed |
3 | Redemption failed |