Get esim data usage
URL
Request Method
- POST
Rate Limit
- 5 requests per second
Request Header
| Header Name | Optional | Value |
|---|---|---|
| content-type | yes | application/json |
| appId | yes | Your app ID |
| timestamp | yes | Current timestamp |
| sign | yes | HMAC-SHA256 signature |
Request Examples
curl --location 'http://sandbox-api.yoni-esim.com/v1/order/e-sim/flow' \
--header 'appId: {{appId}}' \
--header 'timestamp: {{timestamp}}' \
--header 'sign: {{sign}}' \
--header 'Content-Type: application/json' \
--data '{
"orderNo":"20260324162xxxxxx",
"iccid":"8910010000xxxxxx"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"orderNo\":\"20260324162xxxxxx\",\r\n \"iccid\":\"8910010000xxxxxx\"\r\n}");
Request request = new Request.Builder()
.url("http://sandbox-api.yoni-esim.com/v1/order/e-sim/flow")
.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/flow',
'headers': {
'appId': '{{appId}}',
'timestamp': '{{timestamp}}',
'sign': '{{sign}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"orderNo": "20260324162xxxxxx",
"iccid": "8910010000xxxxxx"
})
};
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/flow"
payload = json.dumps({
"orderNo": "20260324162xxxxxx",
"iccid": "8910010000xxxxxx"
})
headers = {
'appId': '{{appId}}',
'timestamp': '{{timestamp}}',
'sign': '{{sign}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Response Example
{
"code": 0,
"data": {
"total": "1024",
"usage": "407.00"
},
"msg": "success"
}
Response Result
| Name | Type | Description |
|---|---|---|
| code | String | eSIM response code (error codes) |
| msg | String | Result description |
| data | Object | Object containing usage information |
| data.total | String | Total data allowance |
| data.usage | String | Data used |
