API reference

Orders

5 endpoints. Every call is POST https://api.useburj.com/v1/<path> with a JSON body.

Buy eSIMs

POST
/order/create

Buys quantity eSIMs of one package and pays from the balance. Send an Idempotency-Key header (a new UUID per order) so a retry after a timeout can never buy twice. If the provider fails, nothing is charged (PROVIDER_ORDER_FAILED, HTTP 502) and you can retry with the same key. If fewer eSIMs come back than asked, you get them plus partial and the rest is refunded. Then call /order/activate for each eSIM to get its install details.

Headers

  • Idempotency-Keystring
    optional

    1–100 visible ASCII characters, ideally a UUID. Replays return the first answer with Idempotent-Replayed: true for 24 hours.

Body

  • packageIdstring
    required

    From /{countryId}/packages

  • quantityinteger
    required

    1 to 100

  • externalReferencestring
    optional

    Your own reference (order / invoice number), up to 100 characters. Stored on every eSIM, filterable, sent in webhooks.

  • notesstring
    optional

    Free text, up to 500 characters

  • sourcestring
    optional

    api (default) or manual (orders placed from the dashboard)

    api
    manual
  • simulatestring
    optional

    Sandbox only: PROVIDER_FAILURE or PARTIAL_FAILURE

    PROVIDER_FAILURE
    PARTIAL_FAILURE

Errors

  • INSUFFICIENT_BALANCE
    HTTP 200

    Insufficient balance. Top up (or set test money with /sandbox/balance), then retry.

  • INVALID_QUANTITY
    HTTP 200

    quantity must be a whole number from 1 to 100. Split bigger orders into several orders of up to 100.

  • IDEMPOTENCY_IN_PROGRESS
    HTTP 409

    A request with this Idempotency-Key is still being processed. Retry in a few seconds. Retry in a few seconds with the same key.

  • IDEMPOTENCY_KEY_REUSED
    HTTP 422

    This Idempotency-Key was already used with a different request. Use a new key for every new order; reuse a key only to retry the same order.

  • PROVIDER_ORDER_FAILED
    HTTP 502

    The eSIM provider could not fulfil the order. Nothing was charged: the full amount is back in your balance. Please retry. Retry with the same Idempotency-Key.

Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.

Get the eSIM profile (install details)

POST
/order/activate

Prepares the eSIM and returns its ICCID, LPA / QR code, one-tap install links (iOS / Android), PIN / PUK and APN. Status becomes 200 (READY). Do this before handing the eSIM to the traveller.

Body

  • orderIdstring
    required

    An id from /order/create

Errors

Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.

One eSIM

POST
/{orderId}/data

Full details of one eSIM: profile, live status and data usage.

Path

  • orderIdstring
    required

    eSIM order id

Body

Send an empty JSON object: {}

Errors

Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.

List eSIMs (filters + pagination)

POST
/orders/get

Newest first. Every filter is optional. Use pagination.nextCursor as cursor for the next page.

Body

  • limitinteger
    optional

    1–200, default 50

  • cursorstring
    optional

    From the previous page

  • sourcestring
    optional

    api (default), manual or all

    api
    manual
    all
  • statusstring
    optional

    Code or label: CREATED, READY, INSTALLED, ACTIVATED, ACTIVE, INACTIVE, EXPIRED, REFUNDED

  • countryIdstring
    optional

    Destination

  • packageIdstring
    optional

    Package

  • externalReferencestring
    optional

    Exact match

  • iccidstring
    optional

    Exact match

  • searchstring
    optional

    Contains: order id, ICCID, eSIM id, reference, notes

  • fromstring
    optional

    YYYY-MM-DD (Riyadh time), inclusive

  • tostring
    optional

    YYYY-MM-DD, inclusive

Errors

Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.

Export eSIMs as CSV

POST
/orders/export
CSV

Same filters as /orders/get (source defaults to all), every matching row (up to 50,000) as a UTF-8 CSV file that opens correctly in Excel. X-Total-Rows and X-Truncated headers.

Body

Send an empty JSON object: {}

Answers with a UTF-8 CSV file (with BOM), up to 50,000 rows. X-Truncated: true means there were more: narrow the filters.

Errors

Like every authenticated endpoint, it can also return AUTH_UNAUTHORIZED (401), RATE_LIMITED (429) and INTERNAL_ERROR (500). See all error codes.