eSIM Order

Submit a esim order.

URL

Request Method

  • POST

Request Header

Header NameOptionalValue
content-typeyesapplication/json
appIdyesYour app ID
timestampyesCurrent timestamp
signyesHMAC-SHA256 signature
idempotentKeynoA unique identifier used to ensure request idempotency

Request Examples

curl --location 'http://sandbox-api.yoni-esim.com/v1/order/e-sim' \
--header 'appId: {{appId}}' \
--header 'timestamp: {{timestamp}}' \
--header 'sign: {{sign}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "packageCode":"YN2602130xxxxx",
   "email":"[email protected]"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n   \"packageCode\":\"YN2602130xxxxx\",\r\n   \"email\":\"[email protected]\"\r\n}");
Request request = new Request.Builder()
  .url("http://sandbox-api.yoni-esim.com/v1/order/e-sim")
  .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/order/e-sim',
  'headers': {
    'appId': '{{appId}}',
    'timestamp': '{{timestamp}}',
    'sign': '{{sign}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "packageCode": "YN2602130xxxxx",
    "email": "[email protected]"
  })

};
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/order/e-sim"

payload = json.dumps({
  "packageCode": "YN2602130xxxxx",
  "email": "[email protected]"
})
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
packageCodenoStringunique identifier for package
emailyesStringEmail

Response Example

{
    "code": 0,
    "data": {
        "orderNo": "20260325162390116407xxxxxx"
    },
    "msg": "success"
}

Response Result

NameTypeDescription
codeStringeSIM response code (error codes)
msgStringResult description
dataObjectObject containing orderNo
data.orderNoStringUnique order number