Firsty

Search...

Search...

Packages

Order a package

Orders a package for an eSIM. Each package plan is specific to a region and has a recurring setting (one-time or auto-renewing).

post/profiles/{profileReference}/esims/{esimReference}/packages

Authorization

Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works

Path parameters

profileReferencestringrequired

The eSIM's profile reference (16-digit numeric string)

esimReferencestringrequired

eSIM reference identifier (18-digit opaque token)

Headers

X-Idempotency-Keystring

Optional idempotency key for mutating requests (POST, PATCH). If provided, duplicate requests with the same key within 48 hours will return the cached original response without duplicating side effects.

Behavior:

  • Same key + same request body → returns cached response (prevents duplicate operations)
  • Same key + different request body → returns 422 error
  • Same key + in-flight request → returns 409 error with Retry-After header
  • Keys expire after 48 hours

Request Body Matching: Request bodies are compared using a deterministic fingerprint. The fingerprint is computed by canonicalizing the JSON (sorting object keys recursively) and hashing with SHA-256. This means:

  • {"a":1,"b":2} and {"b":2,"a":1} are treated as identical ✓
  • Whitespace differences are ignored ✓
  • URL parameters and headers are NOT included in the fingerprint

Best Practices:

  • Use UUIDs or client-generated unique strings
  • Store keys on your side to support retries
  • Don't reuse keys across different operations

Request body

application/json · required

planReferencestringrequired

Plan reference identifier (14-character opaque token)

externalTransactionIdstring

Optional client-provided external transaction ID to associate with this package.

Responses

200Package ordered successfullyapplication/json
Show response body
dataobject
Show properties
packageReferencestring

Package reference identifier (23-character opaque token)

externalTransactionIdstring | null

The client's external transaction ID if provided

profileReferencestring
externalProfileIdstring | null

The client's external profile ID if provided

esimReferencestring

eSIM reference identifier (18-digit opaque token)

iccidstring
planReferencestring

Plan reference identifier (14-character opaque token)

typestring

Package type: data for mobile data, sms for text messaging, voice for calls

Optionsdatasmsvoice
countryCodestring
statusstring
Optionsactivethrottledexhaustedexpiredremoved
recurringboolean

Whether this package will auto-renew

activatedAtstring | null · date-time
expiresAtstring | null · date-time
400Invalid request or package cannot be ordered for this regionapplication/problem+json
Show response body
typestring · urirequired

URI reference to error documentation

titlestringrequired

Short, consistent error summary

statusintegerrequired

HTTP status code

detailstringrequired

Human-readable explanation specific to this occurrence

401Unauthorized - missing or invalid API key403Forbidden - client does not have access to this resource404Resource not found409Request with this idempotency key is still being processed422Idempotency key was previously used with a different request body429Rate limit exceeded500Internal server error503Service temporarily unavailable. Safe to retry.