In this article
Learn how to order several bundles in one go, in the Portal or with the API, so your orders go through without hitting rate limits. You'll also learn how to collect the QR codes and ICCIDs for all your orders.
Before you start
- Do not exceed a quantity of 10 in a single order. For more, place several orders of 10 or fewer (for example 10, 10 and 5 for 25 eSIMs). Use GET /orders to check which orders completed.
- Both API limits apply: leave at least three seconds between order requests, and send no more than 10 requests per second overall.
- In the Portal, the only limit is a quantity of 10 or less per order.
- Orders of 10 should complete fairly quickly.
- The current API version is v2.5.
Order in the Portal
- In the Portal, click Inventory > Buy.
- On the Your Basket page, set the quantity with - and + to 10 or less. Then follow Create an eSIM using the Portal.
Order with the API
Use the POST /orders endpoint. See Create an eSIM using the API. The v2.5 server is https://api.esim-go.com/v2.5 and the reference is at https://docs.esim-go.com/api/v2_5/operations/orders/post.
- Create an order with POST /orders. You need the moniker (bundle code) of the bundle you want to order and the quantity of eSIMs. See Querying the catalogue.
- Set type to transaction to place the order. Use validate to test a request without placing it. See Is there a sandbox or test environment?
- Set the assign parameter to true for auto-assignment. ICCIDs can only be specified if assign is true.
- Check the response. A successful transaction order returns statusMessage "Order completed" and the orderReference. It also includes runningBalance, the balance when the order was placed.
- A validate response shows valid true and no orderReference.
- Wait at least three seconds, then send the next order.
- Complete all of the orders and collect the references.
The total is deducted from your organisation's balance. A validate order does not reduce your balance.
Tip: If you sell group or corporate packages, script your bulk orders to send 10 or fewer per order with a three-second gap. Large customer orders then complete reliably, without 429 errors holding up delivery.
Retrieve QR codes and ICCIDs
- Call GET /esims/assignments once per orderReference; the reference parameter takes one value. Reference: https://docs.esim-go.com/api/v2_5/operations/esimsassignments/get
- Use an Accept header of application/zip to retrieve ZIP files containing the QR codes and ICCIDs. The ZIP contains QR code images in PNG format.
Troubleshooting
Problem |
What to do |
|---|---|
Too many requests (429, API rate limiting) |
Keep to 10 or fewer per order and leave three seconds between orders. Stay within the overall limit of 10 requests per second. A 429 response includes a Retry-After header giving the number of seconds to wait before retrying. |
Badly formatted request (400) |
Check the fields against the v2.5 reference. See API error troubleshooting. |
403 Forbidden |
A missing or invalid API key returns 403. Send your API key in the X-API-Key header. |
410 Gone from GET /esims/assignments |
Returned when the eSIM has been deactivated. |