In this article
Learn how to work out why an API call failed and what to do next, so you can fix integration problems quickly and keep your customers' orders going through. You'll also learn how to handle 400, 403 and 429 errors, including the incompatible bundle error.
Before you start
Check these first:
- You are using API v2.5. The docs are at https://docs.esim-go.com/api/v2_5/.
- You are using the correct API key. Send it in the X-API-Key header.
- If you have regenerated your API key, the previous key stops working immediately. See Find, copy and refresh your API key.
400 - bad request
A 400 means bad request. Common causes:
- The request is formatted wrongly. For example, the request body is not valid JSON because a quote mark or comma is missing.
- Something is misspelt.
- You are sending a badly formatted order request.
- You are topping up an eSIM with an incompatible bundle (see below).
To validate an order, call POST /orders with the validate type. A validate order does not reduce your balance. See Is there a sandbox or test environment?
Tip: Validate new or changed orders before you send them for real. A validate order doesn't reduce your balance, so you can catch a misspelt moniker or badly formatted request before a customer's order fails.
All error responses use the same JSON structure: {"message": "Description of the error"}.
"incompatible bundle/profile combination"
The error is (400) "incompatible bundle/profile combination". In the Portal it may show as "Error Assigning Bundle". It happens because you can't top up an existing eSIM with a bundle on a different profile. See Apply a bundle to an existing eSIM (top-up).
To fix it:
- Assign the bundle to a new eSIM.
- Issue the new eSIM to your customer.
With allowReassign set to true on the order, a new eSIM is provided if the bundle is not compatible with the eSIM profile. See eSIM profiles explained.
403 - access denied / unauthorised
A 403 means access was denied. A missing or invalid API key returns 403 Forbidden. Common causes:
- Your API key is wrong, or you are calling an ICCID that isn't assigned to your organisation.
- Your call includes a moniker for a bundle group you do not have access to. To get access to another bundle group, contact eSIM Go at https://esimgo.com/contact.
- The ICCID you are calling has been returned to eSIM Go and has left your organisation.
eSIM Go ICCIDs always begin with 89444, 89320, 89431, 89353 or 89441. Any other prefix is from a different provider, not eSIM Go.
To see which bundle groups you have, call GET /organisation/groups ("Get Bundle Groups").
If you get a 403 on an ICCID, check that the ICCID belongs to your account, that you are using the correct API key, and whether the ICCID has been returned to eSIM Go. If it still fails, raise a request on the support request form (https://help.esim-go.com/hc/en-gb/requests/new); see What to include in a support request.
429 - too many requests
A 429 means API rate limiting. To stay within the limit when ordering:
- Do not exceed a quantity of 10 in a single order. See Ordering multiple bundles.
- Leave a minimum of three seconds between orders.
There is also an overall rate limit of 10 requests per second. A 429 response includes a Retry-After header giving the number of seconds to wait before retrying.