Skip to Content
🚀 Trusted by travel businesses worldwide - Roamify eSIM API
API Errors

API Errors

This page collects the errors documented across the Roamify API in one place, grouped by HTTP status and module. Each module page has the full error table next to its endpoints. Use this page to find an error message you received and decide what to do next.

Table of Contents

Reading an error

Refund errors have the form { "message": "...", "status": "failed", "code": "..." }, so you can branch on code. The voucher and insurance pages document the HTTP status and the message text for each error. Match on the status first and treat the message as human-readable text.

Authentication errors

These apply to every endpoint. See Authentication.

HTTPMeaningWhat to do
401Missing token, malformed Authorization header, or invalid or rotated token.Send Authorization: Bearer <token> with the current token from the Partner Portal. A rotated token stops working immediately.
403The token is valid but does not have permission for the requested action.Check that the feature is enabled for your API key. Contact support if it should be.
500Internal server error.Retry with backoff, or contact support if it persists.

Which errors to retry

  • 400, 404, 422 describe the request itself. Fix the request instead of retrying it unchanged.
  • 500 and 503 are temporary: retry with backoff. The refund 500 codes say “Try again later”, and the voucher 503 says to retry shortly or contact support.
  • 502 on POST /api/insurance/apply says in its message whether to try again later or to verify the traveller details. Issuance is not idempotent, so check the policy first; see Retries and idempotency.
  • 409 means the state of a resource conflicts with the request. Read the message before retrying. In particular, issuing an insurance policy is not idempotent: do not blindly retry POST /api/insurance/apply after a 409. See Retries and idempotency.

Refund errors

From Refunds.

HTTPcodeMeaning
400INVALID_PARAMETERA parameter is missing or invalid. For example both or neither of iccid and esimId, more than 20 bulk entries, or an invalid limit.
400REFUND_INVALID_REASONreason is not one of the supported reasons.
400REFUND_NOTES_REQUIREDreason is OTHER without notes of at least 10 characters.
404ESIM_NOT_FOUNDNo eSIM of your account has that iccid or esimId.
404REFUND_REQUEST_NOT_FOUNDNo request matches the refundId, esimId or iccid.
409REFUND_REQUEST_ALREADY_EXISTSThe eSIM already has an open request. The body carries its refundId.
409REFUND_INVALID_STATUSOnly a PENDING request can be cancelled.
422REFUND_NOT_ELIGIBLEThe eSIM cannot be refunded. reasons lists why, for example ESIM_ALREADY_REFUNDED.
422REFUND_PRODUCT_TYPE_NOT_SUPPORTEDOnly esim is supported.
500REFUND_CREATE_FAILED, REFUND_GET_FAILED, REFUND_CANCEL_FAILED, REFUND_SERVICE_NOT_CONFIGUREDA temporary failure. Try again later.

Voucher errors

From Vouchers. The voucher endpoints are enabled per API key for selected partners.

HTTPMessageEndpoints
400”packageId” is requiredCreate vouchers
400”quantity” must be a number, must be greater than or equal to 1, or must be less than or equal to 10Create vouchers
400Invalid quantity, please provide a whole number of at least 1Create vouchers
400”status” must be one of [ACTIVE, REDEEMED, CANCELLED]List vouchers
400”limit” must be greater than or equal to 1List vouchers
401Unauthorized, please make sure your have provided the correct api keyAll voucher endpoints
403Voucher creation is not enabled for this API key, please contact support to have it enabledAll voucher endpoints
403This packageId is not allowed for voucher creation with this API key, please use one of the packages allowed for your accountCreate vouchers
404Voucher not found, please make sure you have provided the correct voucher ID or codeGet, get by code, revoke
409Vouchers with the same referenceId already exist, please make sure you have provided a unique referenceIdCreate vouchers
409Voucher has already been redeemed and can no longer be revokedRevoke
409Only active vouchers can be revoked, this voucher is no longer activeRevoke
500Failed to create, get or revoke vouchers, please try again laterAll voucher endpoints
503Vouchers cannot be issued at the moment, please retry shortly or contact supportCreate vouchers

A voucher that belongs to another partner is reported as 404, not 403.

Insurance errors

From Insurance orders, policies and packages. Insurance is available to travellers who are citizens or residents of Saudi Arabia.

Orders

HTTPMessage
400Only insurance packages can be ordered through this endpoint. Every packageId must start with ‘insurance-’; use POST /esim/order for eSIM packages
400Invalid quantity, please make sure your have provided the correct quantity
400Exceed maximum total quantity of 5, please make sure your have provided the correct quantity and the quantity does not exceed the maximum allowed quantity 5
400Missing required fields, please provide all required fields according to the documentation
404Order not found, please make sure your have provided the correct orderId or referenceId
409Order with the same referenceId already exists, please make sure your have provided a unique referenceId
409Insufficient partner balance, please recharge it first before placing order

An eSIM order ID returns 404 on the insurance order endpoint, even though the order exists.

Applying and reading policies

HTTPMessage
400This insurance package requires idNumber, passportNumber, dateOfBirth or phoneNumber, please provide insurer.idNumber, insurer.passportNumber, insurer.dateOfBirth (DD/MM/YYYY) or mobile (international format without the leading ’+’). Each message names the one field that the package requires and you left out
400Invalid traveller name, nationality, idNumber, passportNumber, dateOfBirth, mobile or email
400Invalid startDate or endDate. Use DD/MM/YYYY, and make sure endDate is after startDate
400Coverage cannot start today, please provide a startDate at least 1 day in the future
400The requested coverage window is longer than the purchased package allows, please shorten it or buy a longer package
400Insurance details failed validation, please make sure you have provided all the required traveller fields
404Insurance policy not found, please make sure you have provided the correct policyId
409This insurance policy has already been issued and cannot be applied again
409This insurance policy is currently being issued, please retry with GET /insurance/policy?policyId=id after some time
409A policy has already been issued for this reference, please contact support if you believe this is an error
502Failed to issue the insurance policy, please try again later or contact support
502The insurance provider rejected the request, please verify the traveller details and try again

A policy that belongs to another partner is reported as 404, not 403.

Packages

HTTPMessage
404Insurance package not found, please make sure you have provided a valid packageId
500Failed to get insurance packages, please try again later
Last updated on