Get eSIM usage
Returns the current data, SMS and voice usage of an eSIM.
Returns the current data, SMS and voice usage of an eSIM.
Reads the live usage when the request is made and returns esimStatus, profileStatus and the allowed
and remaining data (MB), SMS (messages) and voice (minutes), including top-ups. An amount is null when it is
unlimited (isDataUnlimited, isSmsUnlimited, isVoiceUnlimited), not reported or not
included. When the usage cannot be read live, or the plan does not report live usage, it returns the last known
usage. An ICCID that is not one of your eSIMs gives 404 / 10004.
PartnerApiKeyX-Partner-Key<token>Partner API Key (X-Partner-Key)
iccid*stringThe eSIM's ICCID, from the order item's fulfillment.result.details.iccid.
OK
- response
An eSIM's statuses and its current allowances and remaining amounts, plan and top-ups together: data in MB
(1 MB = 1024 KB), SMS in messages, voice in minutes. An amount is null when it is unlimited (its
is...Unlimited flag is then true), not reported or not included.
iccid*stringThe eSIM's ICCID.
esimStatus*stringThe eSIM's lifecycle status, as the order item's esimStatus.
"new""procuring""pending""failed""ready""cancelled""revoked""expired""unknown"profileStatus*stringThe installed profile's status, as the order item's profileStatus.
"empty""new""downloaded""installed""activated""inactive""deleted""revoked""expired""unknown"start?|When the plan started, in UTC; null until it is activated.
date-timeend?|When the plan ends, in UTC, as last reported; null while no end is reported.
date-timeallowedData?|Total data in MB; null when unlimited or not reported.
int64remainingData?|Remaining data in MB; null when unlimited or not reported.
int64isDataUnlimited*booleanWhether the data is unlimited.
allowedSms?|Total SMS, in messages; null when unlimited, not reported or not included.
int64remainingSms?|Remaining SMS, in messages; null when unlimited, not reported or not included.
int64isSmsUnlimited*booleanWhether SMS are unlimited.
allowedVoice?|Total voice, in minutes; null when unlimited, not reported or not included.
int64remainingVoice?|Remaining voice, in whole minutes; null when unlimited, not reported or not included.
int64isVoiceUnlimited*booleanWhether voice is unlimited.
curl -X GET 'https://api.sandbox.openroam.com/v1/esims/8944501234567890123/usage'{ "iccid": "string", "esimStatus": "new", "profileStatus": "empty", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "allowedData": 0, "remainingData": 0, "isDataUnlimited": true, "allowedSms": 0, "remainingSms": 0, "isSmsUnlimited": true, "allowedVoice": 0, "remainingVoice": 0, "isVoiceUnlimited": true}List eSIM usage history GET
Lists the recorded usage readings of an eSIM, newest first. Returns `{ items, pagination }`, one item per usage reading, with its allowances, remaining amounts and usage and expiry bands. `from` and `to` limit the readings by `capturedAt`, both inclusive. An ICCID that is not one of your eSIMs gives 404 / 10004.
Provision a deferred eSIM POST
Provisions a deferred eSIM bought with `inputs.isInstant: false` and returns it. Creates the eSIM for an order item that delivered an entitlement, and returns it as `GET /esims/{iccid}` does. The item's result moves to `provisioning.status` `processing` and then `ready`, and each change sends an `order.fulfillment.updated` webhook. An `Idempotency-Key` header with a UUID is required: a retry with the same key and body after the call finished returns the eSIM as it reads now and starts nothing again, 409 / 12002 with `Retry-After` while the call is still running, and a changed body gives 409 / 12001. The optional body `{ travelStartDate }` is needed when the plan requires the first day of travel and the order did not send it (400 / 10001 without it); a date other than the one recorded, or a new date once provisioning has started, gives 409 / 10005. An instant eSIM gives 400 / 10001, and an ID that names no eSIM purchase of yours, such as a top-up item, gives 404 / 10004.