How can I find the ID of a SIM based on its ICCID (API)?
CompletadaAll the EMnify API is based on SIM ID but it is usually much easier to find the ICCID. Is there an API call I can use to get the EMnify ID based on its ICCID?
Yes you can use this one:
GET https://cdn.emnify.net/api/v1/sim?q=iccid:
Example:
GET https://cdn.emnify.net/api/v1/sim?q=iccid:898830300000xxxxxx7
The result coming in shows the ID of the SIM which can be used in upcoming API calls.
-
Comentario oficial
For the new emnify IoT eSIMs, the format of the ICCID (text and barcode) has been updated to include the Luhn checksum digit.
To find the SIM ID using the ICCID with the Luhn checksum digit, you can change the parameter being searched like this:
GET https://cdn.emnify.net/api/v1/sim?q=iccid_with_luhn:898830300000xxxxxx7y
Alternatively, the ICCID can be shortened (removing the Luhn checksum digit) and you may continue to use the API calls as above.
Some background:
Every ICCID can be described with / without the Luhn checksum digit;
ICCID: 898830300000xxxxxx7
ICCID with Luhn: 898830300000xxxxxx7yThe ICCIDs without the Luhn checksum digit are sequential whereas the AT command (AT+CCID=?) will typically return the ICCID with the Luhn checksum digit.
The emnify REST API now returns both ICCID values:
iccid
andiccid_with_luhn
when a call is made to query the SIM/endpoint. The eID value includes the Luhn checksum digits by default.Further information:
https://docs.emnify.com/glossary#luhn-checksum-digit
Acciones de comentarios -
Searching with the ICCID, using the 'ICCID with Luhn' parameter also works.
GET https://cdn.emnify.net/api/v1/sim?q=iccid_with_luhn:898830300000xxxxxx7
Iniciar sesión para dejar un comentario.
Comentarios
2 comentarios