Naar de inhoud
iRoamly Shop

API-documentatie

Referentie voor de iRoamly Shop API: authenticatie, bundels, aankoop en levering, verlenging en verbruik.

Overzicht

Basisuitleg

Om de gegevensoverdracht met de server te beveiligen, worden de volgende beveiligingsmechanismen gebruikt:

  1. 1.Alle interfaces communiceren via beveiligde HTTPS secure-verbindingen.
  2. 2.Toegewezen AuthKey voor API-authenticatie (maximale lengte: 32 tekens).
  3. 3.Toegewezen AuthSecret om de hash van het verzoek te genereren (maximale lengte: 50 tekens).
  4. 4.Verzoeken worden geauthenticeerd met SHA-256-hashes.
Overzicht

Interfacestandaarden

Basispad:https://api.iroamly.shop/
Protocol:HTTPS
Methode:GET / POST
Gegevensformaat:application/json

Headerparameters van het verzoek:

AuthKey: authenticatiesleutel van de klant, type tekenreeks (String)

Certification: string met de SHA-256-hash van AuthKey+AuthSecret, in die volgorde samengevoegd.

/common/getPlanItem vereist geen AuthKey- of Certification-header.

API-endpoints

Regionale bundellijst ophalen

Request-URL:https://api.iroamly.shop/common/getPlanItem
Methode:GET

Er is geen AuthKey- of Certification-header nodig.

Requestparameters:

ParameterBeschrijvingType
regionAccepteert ISO2-codes, landnamen (niet hoofdlettergevoelig) of gestandaardiseerde notaties (bijv. united-states).String

Responseformaat:

Gelukt: HTTP 200. De bundels worden geretourneerd in data.list.

Geeft altijd HTTP 200 terug. Als er geen gegevens zijn, is data.list een lege array en is msg Success.

Beschrijving van de responsevelden:

VeldBeschrijvingType
planBundelnaam (bevat regio, type, databundel en looptijd).String
productCodeUnieke bundel-ID voor aankopen of zoekopdrachten.String
dataDatabundel (bijv. 10GB, Unlimited, 500MB).String
typeBundeltype (bijv. Total, Daily, Unlimited).String
plan_typeBundelcategorie (bijv. default).String
package_typePakkettype (bijv. Data Only).String
durationGeldigheidsduur in dagen (bijv. 10).String
speedNetwerksnelheid (bijv. 4G / 5G).String
operatorOndersteunde providers (bijv. T-Mobile/AT&T).String
regionOfficiële regionaam (bijv. United States).String
region_indexGestandaardiseerde regio-identificatie (kleine letters met koppeltekens, bijv. united-states).String
creditBundelprijs in credits (geen USD).Float
remarkAanvullende opmerkingen (bijv. regels voor snelheidsbeperking).String
created_atTijdstempel waarop de bundel is aangemaakt (ISO 8601-formaat).String
Voorbeeldrequest
"https://api.iroamly.shop/common/getPlanItem?region=US"
Voorbeeldresponse
{
  "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"
     }
    ]
  }
}
API-endpoints

QR-code direct kopen

Request-URL:https://api.iroamly.shop/openapi/purchaseqrcode
Methode:POST

Requestparameters:

ParameterBeschrijvingType
emailHet e-mailadres dat de QR-codes ontvangt. Als het leeg is, wordt er geen e-mail verzonden.String
productListVerzameling productenObject[]

Velden van productList:

VeldBeschrijvingType
planBundelnaam. Geef plan of productCode op.String
productCodeBundel-ID (productCode uit Regionale bundellijst ophalen). Geef productCode of plan op.String
quantityAantalInt
Testbundel:iRoamly-Test-10GB

Volgende stap: gebruik QR-code opvragen (https://api.iroamly.shop/openapi/qrcodeQuery) om de QR-code op te halen

Voorbeeldparameters
{
  "email": "2m827n32d@gmail.com",
  "productList": [
    {
      "plan": "United States-eSIM-10GB-10 Days-Total",
      "quantity": 2
    },
    {
      "plan": "Albania-10GB-15 Days-Total",
      "quantity": 1
    }
  ]
}
Voorbeeldresponse
{
  "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"
}
API-endpoints

Inwisselcode kopen

Request-URL:https://api.iroamly.shop/openapi/purchaseCode
Methode:POST

Requestparameters:

ParameterBeschrijvingType
emailE-mailString
productListVerzameling productenObject[]

Velden van productList:

VeldBeschrijvingType
planBundelnaam. Geef plan of productCode op.String
productCodeBundel-ID (productCode uit Regionale bundellijst ophalen). Geef productCode of plan op.String
quantityAantalInt
Testbundel:iRoamly-Test-10GB
Voorbeeldparameters
{
  "email": "2m827n32d@gmail.com",
  "productList": [
    {
      "plan": "United States-eSIM-10GB-10 Days-Total",
      "quantity": 2
    },
    {
      "plan": "Albania-10GB-15 Days-Total",
      "quantity": 1
    }
  ]
}
Voorbeeldresponse
{
  "code": 1,
  "msg": "success",
  "orderId": "xxx-xxxx-sd9hn8df333" // Order number, can be used to query redeem code
}
API-endpoints

Inwisselcode opvragen

Request-URL:https://api.iroamly.shop/openapi/codeQuery
Methode:POST

Requestparameters:

ParameterBeschrijvingType
orderIdBestelnummerString
Voorbeeldparameters
{
  "orderId": "xxx-xxx-dh239jdu28",
}
Voorbeeldresponse
{
  "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
    }
  ]
}
API-endpoints

Omzetten naar QR-code

(Let op: QR-codes worden na het omzetten naar het opgegeven e-mailadres verzonden. Grotere aantallen kunnen langer duren.)

Request-URL:https://api.iroamly.shop/openapi/redeemQRcode
Methode:POST

Requestparameters:

ParameterBeschrijvingType
emailE-mailString
codeListVerzameling inwisselcodesObject[]

Velden van productList:

VeldBeschrijvingType
redeemCodeInwisselcodeString
Voorbeeldparameters
{
  "email": "2m827n32d@gmail.com",
  "codeList": [
    {
      "redeemCode": "m8hed7h2fed",
    },
    {
      "redeemCode": "cn88beg9edj",
    }
  ]
}
Voorbeeldresponse
{
  "code": 1,
  "msg": "success",
}
API-endpoints

QR-code opvragen

Request-URL:https://api.iroamly.shop/openapi/qrcodeQuery
Methode:POST

Requestparameters:

ParameterBeschrijvingType
redeemCodeInwisselcodeString

Beschrijving van de responsevelden:

VeldBeschrijvingType
redeemCodeInwisselcodeString
qrcodeURL van de QR-codeafbeeldingString
statusStatus van de inwisselcode (zie Definities van statussen van inwisselcodes)Int
qrcode_contentInhoud van de QR-code (LPA-activeringsstring, bijv. LPA:1$…)String
iscouldrenewalOf de eSIM kan worden verlengd: 1 - kan worden verlengd 0 - kan niet worden verlengdInt
Voorbeeldparameters
{
  "redeemCode": "m8hed7h2fed",
}
Voorbeeldresponse
{
  "code": 1,
  "msg": "success",
  "redeemCode": "m8hed7h2fed",
  "qrcode": "https://dsfjigewafe/qrcode.jpg"
}
API-endpoints

Status van verlengingsbundels ophalen

Request-URL:https://api.iroamly.shop/openapi/getRenewPlanStatus
Methode:POST

Requestparameters:

ParameterBeschrijvingType
redeemCodeInwisselcodeString

Beschrijving van de responsevelden:

De code op het hoogste niveau van de response geeft aan of de inwisselcode kan worden verlengd: 0 - verlenging mogelijk, -1 - verlenging niet mogelijk. De verlengingsopties staan in data.renewList:

VeldBeschrijvingType
renewtypeVerlengingstype: 0 - Activeren zodra de huidige bundel verloopt 1 - Direct activeren (resterende data vervalt) 2 - Activeren op een opgegeven tijdstipInt
starttimeBegin van het kiesbare activeringsvenster: het vroegste activeringstijdstip dat je kunt kiezen (verlengingstype 2).String
endtimeEinde van het kiesbare activeringsvenster: het laatste activeringstijdstip dat je kunt kiezen (verlengingstype 2).String
Voorbeeldparameters
{
  "redeemCode": "3cd2m3f23f3f3",
}
Voorbeeldresponse
{
  "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"
}
API-endpoints

Code verlengen

(Let op: bij verlengen moet de verlengingsgroep van de gekozen bundel overeenkomen met die van de oorspronkelijke bundel.)

Request-URL:https://api.iroamly.shop/openapi/renewcode
Methode:POST

Requestparameters:

ParameterBeschrijvingType
redeemCodeCode die moet worden verlengdString
planVerlengingsbundelString
renewtypeVerlengingstype: 0 - Activeren zodra de huidige bundel verloopt 1 - Direct activeren (resterende data vervalt) 2 - Activeren op een opgegeven tijdstipInt
renewtimeDatum en tijd van ingang (verplicht). Formaat: YYYY-MM-DDTHH:mm:ssZString
Voorbeeldparameters
{
  redeemCode: "DEF456UVW",
  plan: "basic_yearly",
  renewtype: 0,
  renewtime: "2024-12-31T23:59:59Z"
}
Voorbeeldresponse
{
  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"
}
API-endpoints

Bundelstatistieken ophalen

Request-URL:https://api.iroamly.shop/openapi/getnetworkflow
Methode:GET

Requestparameters:

ParameterBeschrijvingType
redeemCodeOp te vragen inwisselcode.String

Beschrijving van de responsevelden:

ParameterBeschrijvingType
status0 - Inactief 1 - Actief 2 - Verlopen 9 - OngeldigInt
flow_useVerbruikte data binnen de factureringsperiode (in MB)String
flow_totalTotale data in de factureringsperiode (in MB, of onbeperkt)String
start_dataStarttijd van de bundelString
end_dataEindtijd van de bundelString
installDeviceGeïnstalleerd toestelString
installCountAantal installatiesString
installTimeInstallatietijdString
Geldig voorbeeld
{
  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"
}
Ongeldig voorbeeld
{
  code: -1,
  msg: "error message"
}
Definities

Definities van statuscodes in de response

CodeBeschrijving
1Gelukt
2Authenticatie van requestparameters mislukt
3Parameters zijn niet aangeleverd zoals vereist
4Productcode bestaat niet
5Onvoldoende credits
6Inwisselcode bestaat niet
7Inwisselcode is al ingewisseld of bestaat niet
-1Verzoek mislukt

Succes is code 1, behalve bij /common/getPlanItem en /openapi/getRenewPlanStatus, die bij succes code 0 teruggeven.

Definities

Definities van statussen van inwisselcodes

StatusBeschrijving
0Niet ingewisseld
1Wordt ingewisseld
2Ingewisseld
3Inwisselen mislukt
Codereferentie

Inwisselcode kopen (Python)

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"
}
Codereferentie

Inwisselcode opvragen (Python)

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"
}
Codereferentie

Omzetten naar QR-code (Python)

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"}
Codereferentie

QR-code opvragen (Python)

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"
}