eSIM Package List

Get esim package list

URL

Request Method

  • POST

Rate Limit

  • 5 requests per second

Request Header

Header NameOptionalValue
content-typeyesapplication/json
appIdyesYour app ID
timestampyesCurrent timestamp
signyesHMAC-SHA256 signature

Request Examples

curl --location 'http://sandbox-api.yoni-esim.com/v1/package/e-sim/page' \
--header 'appId: {{appId}}' \
--header 'timestamp: {{timestamp}}' \
--header 'sign: {{sign}}' \
--header 'Content-Type: application/json' \
--data '{
    "current":1,
    "size":10
}'
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"current\":1,\r\n    \"size\":10\r\n}");
Request request = new Request.Builder()
  .url("http://sandbox-api.yoni-esim.com/v1/package/e-sim/page")
  .method("POST", body)
  .addHeader("appId", "{{appId}}")
  .addHeader("timestamp", "{{timestamp}}")
  .addHeader("sign", "{{sign}}")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'http://sandbox-api.yoni-esim.com/v1/package/e-sim/page',
  'headers': {
    'appId': '{{appId}}',
    'timestamp': '{{timestamp}}',
    'sign': '{{sign}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "current": 1,
    "size": 10
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests
import json

url = "http://sandbox-api.yoni-esim.com/v1/package/e-sim/page"

payload = json.dumps({
  "current": 1,
  "size": 10
})
headers = {
  'appId': '{{appId}}',
  'timestamp': '{{timestamp}}',
  'sign': '{{sign}}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Request Parameter

NameOptionalTypeDescription
currentnoNumberCurrent page (greater than or equal to 1)
sizenoNumberPage size (between 1 and 50)

Response Example

{
    "code": 0,
    "data": {
        "records": [
            {
                "packageName": "Japan, 1 Day, 500M, 256kbps",
                "packageCode": "YN2602130xxxxx",
                "price": 0.50,
                "simType": "1",
                "packageType": "1",
                "mcc": "440,441",
                "country": "日本",
                "countryEn": "Japan",
                "flow": 500,
                "apn": "mobile.demo.com",
                "effectiveDays": 60,
                "operator": "Docomo / Softbank / Rakuten Mobile / KDDI",
                "days": "1",
                "desc": "ESIM can be installed in advance, and upon arrival at the location, the package will be automatically activated and the SIM card's validity days will begin to be calculated."
            },
            {
                "packageName": "Malaysia, 1 Day, 1GB, 256kbps",
                "packageCode": "YN2602130xxxxx",
                "price": 1.00,
                "simType": "1",
                "packageType": "2",
                "mcc": "502",
                "country": "马来西亚",
                "countryEn": "Malaysia",
                "flow": 1024,
                "apn": "mobiledata",
                "effectiveDays": 60,
                "operator": "Maxis Berhad",
                "days": "1",
                "desc": "ESIM can be installed in advance, and upon arrival at the location, the package will be automatically activated and the SIM card's validity days will begin to be calculated."
            }
        ],
        "total": 2
    },
    "msg": "success"
}

Response Result

NameTypeDescription
codeStringeSIM response code (error codes)
msgStringResult description
dataObjectObject of packages.
data.totalNumberTotal number of packages
data.recordsArrayArray of packages.
records[0].packageNameStringPackage name
records[0].packageCodeStringUnique identifier of the package.
records[0].priceNumberPrice (in the contract currency).
records[0].simTypeStringSIM type (currently, only 1 is supported, indicating eSIM).
records[0].packageTypeStringPackage type (1 = daily, 2 = multiple months).
records[0].mccStringMobile Country Code (MCC).
records[0].countryStringCountry name
records[0].countryEnStringCountry name in English
records[0].flowNumberPackage data allowance; 0 indicates unlimited data. Unit: MB
records[0].apnStringAccess Point Name (APN).
records[0].effectiveDaysNumberValidity period before eSIM activation (days).
records[0].operatorStringCarrier / mobile network operator
records[0].daysStringPackage duration (days)
records[0].descStringPackage description