When creating a new eSIM using the API you have the ability to do so by either generating your own QR code or using the eSIM Go API to download a QR code.
The purpose for Option 1 is if you require the ability to generate your own bespoke company branded QR codes and for some reason do NOT use eSIM Go Branding QR feature. If you do not need this option or already use eSIM Go Branded QR feature, and would like to generate a QR code then please skip to Option 2
The below assumes that you have already Located And Entered Your API Key
Option 1 - Generate your own QR Code
Step 1)
Order the required bundle using this API https://docs.esim-go.com/api/v2_4/operations/orders/post/
Example below:
- In the request body click "EXAMPLE"
- Change "type" from "validate" to "transaction"
- In this example “assign” is set as “true” and it means that the bundle would be assigned to the eSIM. If you want to add a bundle to the inventory and assign it to the eSIM later, set “assign” as “false”.
- Enter "quantity" of bundle required - in this example "1"
-
In "item" enter the name of the bundle, this example is "esim_1GB_7D_NL_V2".
Names of bundles are case sensitive and can be found in the API catalogue - https://docs.esim-go.com/api/v2_4/operations/catalogue/get/ - If you set “assign” as “true” and you want to assign your bundle to a new eSIM, just for "iccid" delete "string" (leave speech marks). If it’s false, you can remove the “iccids” bit.
- Click "Try"
If you have a successful transaction then you will see in the "RESPONSE" section: "statusMessage": "Order completed"
Step 2)
In the response you will, also, have details about new eSIM ICCID and smdpAddress, matchingId values, which are used to generate the QR Code. Example of the API response below.
Step 3)
Using your QR Code generator of choice, present the information in the following format LPA:1$smdpAddress$matchingID so in the above example you would use:
LPA:1$rsp-3104.idemia.io$4I93G-KIS04-H5UUV-VR30Z
Option 2 - Use eSIM Go API to download QR Code with default profile (unbranded or branded with eSIM Branding feature on The Portal)
Step 1)
Order the required bundle using this API https://docs.esim-go.com/api/v2_4/operations/orders/post/
Example below:
- In the request body click "EXAMPLE"
- Change "type" from "validate" to "transaction"
- In this example “assign” is set as “true” and it means that the bundle would be assigned to the eSIM. If you want to add a bundle to the inventory and assign it to the eSIM later, set “assign” as “false”.
- Enter "quantity" of bundle required - in this example "1"
-
In "item" enter the name of the bundle, this example is "esim_1GB_7D_NL_V2".
Names of bundles are case sensitive and can be found in the API catalogue - https://docs.esim-go.com/api/v2_4/operations/catalogue/get/ - If you set “assign” as “true” and you want to assign your bundle to a new eSIM, just for "iccid" delete "string" (leave speech marks). If it’s false, you can remove the “iccids” bit.
-
If you would like to generate eSIM with default branding profile - you can remove “profileID” parameter. If you have several branding profiles and want to use a different from default profile, please set a profile ID in “profileID”.
You can find branding profile ID by logging in to The Portal and navigating to “eSIM Branding”. - Click "Try"
If you have a successful transaction then you will see in the "RESPONSE" section:
"statusMessage": "Order completed" along with the number of eSIMs assigned.
Copy an order reference for the next step.
Step 2)
To download the QR Code as a .ZIP:
Use API https://docs.esim-go.com/api/v2_4/operations/esimsassignments/get/
- Format selection is controlled via the 'Accept' header in the request. If you want to download your QR in .ZIP format, please set it up as “'application/zip'. The response is a ZIP file containing QR code images in PNG format.
- Enter the order reference from the response in step 1, the example here is:
e268b769-1cb3-4335-aed8-52ecb78425e9
- In response you will see a binary value, so you can write that to file.
You will now have a zip file available to open, inside you will see the QR code in PNG format and also a CSV with the relevant ICCID(s)