Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

Catalog

  • PackagesGET
  • Compatible devicesGET

Orders and top-ups

  • Create an orderPOST
  • Top-up packagesGET
  • Top upPOST

After the order

  • UsageGET
  • Usage of several eSIMsGET
  • BookingsGET
  • Top-up historyGET
  • Check ownershipGET
  • Setup dataGET
  • Installation instructionsGET

Objects

  • eSIM package
  • eSIM booking

eSIMs · After the order

Get the usage of an eSIM

Get the remaining and the total data, voice and SMS of one eSIM of your agency, with its status and expiry.

GET/api/v1/esims/usage/{iccid}

Requires an API key with Read permission; a Read+Write key works too.

Usage is not real time. The last answer is kept for 15 minutes per eSIM (cached and cache_age_seconds), and force=true asks the supplier again. Use force after a topup or when a traveler is waiting, not to poll: the supplier limits how often usage can be read. If the supplier cannot answer, the last known usage is returned with stale: true and a stale_reason; without a last known value the call fails with the supplier's status, and retry_after says how long to wait when the supplier was rate limited.

remaining and total are in megabytes. In the sandbox the usage of a new eSIM is the full allowance and does not change after a topup.

curl https://api.fx-port.com/api/v1/esims/usage/8900000540463077957 \
  -H "Authorization: Bearer fxp_test_YOUR_KEY"
Response200
{
  "environment": "sandbox",
  "success": true,
  "data": {
    "data": {
      "remaining": 1024,
      "total": 1024,
      "expired_at": "2026-11-08 15:23:29",
      "is_unlimited": false,
      "status": "ACTIVE",
      "remaining_voice": 0,
      "remaining_text": 0,
      "total_voice": 0,
      "total_text": 0
    },
    "meta": {
      "message": "success"
    }
  }
}
Response200
{
  "environment": "sandbox",
  "success": true,
  "data": {
    "data": {
      "remaining": 1024,
      "total": 1024,
      "expired_at": "2026-11-08 15:23:29",
      "is_unlimited": false,
      "status": "ACTIVE",
      "remaining_voice": 0,
      "remaining_text": 0,
      "total_voice": 0,
      "total_text": 0
    },
    "meta": {
      "message": "success"
    }
  },
  "cached": true,
  "cache_age_seconds": 0
}

Request

Path parameters

iccidstringrequired

The eSIM to read. It must be an eSIM that your agency ordered.

Query parameters

forceboolean

Skip the 15-minute cache and ask the supplier again. An empty value means not sent.

Default false.

Response

200The usage of the eSIM.

successboolean

true when usage is returned.

dataobject

The usage and the supplier's status line.

ShowHide 2 attributes
dataobject

The usage of one eSIM.

ShowHide 9 attributes
remaininginteger

Data left, in megabytes.

totalinteger

Data allowance of the eSIM, in megabytes.

expired_atstring

When the eSIM expires: YYYY-MM-DD HH:MM:SS, UTC, without a zone.

is_unlimitedboolean

true for an unlimited eSIM.

statusstring

State of the eSIM, as the supplier reports it. One of ACTIVE, EXPIRED, NOT_ACTIVE, FINISHED.

remaining_voiceinteger

Voice minutes left.

remaining_textinteger

SMS left.

total_voiceinteger

Voice minutes of the allowance.

total_textinteger

SMS of the allowance.

metaobject

The supplier's status line.

ShowHide 1 attribute
messagestring

success when the supplier answered.

cachedboolean

true when the usage comes from the 15-minute cache or is a last known value. Absent on a fresh answer.

cache_age_secondsinteger

Age of the cached usage in seconds. Present with cached when the value is within the cache window.

staleboolean

true when the supplier could not answer and the last known usage is returned instead.

stale_reasonstring

Why the supplier could not answer. Present with stale.

retry_afterinteger

Seconds to wait before asking the supplier again. Present with stale when the supplier was rate limited.

Errors

StatusCodeExample message
400invalid_iccidiccid must be 18-22 digits (received '123').
404iccid_not_foundNo eSIM with this ICCID was found for your account.
429rate_limit_exceededRate limited

The shape of the error body depends on the endpoint. See Errors for every shape and code.

Related guides

  • eSIM usage
PreviousTop up an eSIMNext Get the usage of several eSIMs

© 2026 FX-Port

TermsPrivacy[email protected]