Query QR Info
Purpose
Returns the QR code data and lifecycle status associated with the SIM specified in the <iccid> element.
Some virtual SIMs are deployed to devices using a QR code. This query provides:
- The QR code payload string required to generate the QR code
- The current QR lifecycle status
If a SIM does not have a QR code associated with it, the response will return Invalid ICCID.
Endpoint
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
Request (XML)
<query-qr-info version="1" api-id="123456">
<authentication>
<username>username</username>
<password>password</password>
</authentication>
<iccid>1234567890123456789</iccid>
</query-qr-info>Response (Success)
<query-qr-info-response api-id="123456">
<api-outcome>Success</api-outcome>
<qr-code>LPA:1$url.to.provider$XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</qr-code>
<qr-status>0</qr-status>
</query-qr-info-response>Response Elements
Element | Description |
|---|---|
<qr-code> | String containing the data required to generate the QR code used to deploy the SIM. |
<qr-status> | Integer representing the current lifecycle status of the QR code. |
QR Status Values
Value | Meaning |
|---|---|
0 | Unassigned |
1 | Provided to customer |
2 | Reserved |
3 | Installed on device |
4 | Deleted from device |
Behaviour Notes
- The <qr-code> value is not itself a QR image. It is the data string required to generate the QR code for device deployment.
- The <qr-status> allows applications to track the lifecycle of a virtual SIM.
- If the specified SIM does not have QR provisioning enabled, the request will return Invalid ICCID.
Response (Failure)
If a request cannot be processed, the response will include:
- api-outcome indicating failure
- An error description explaining the reason
Failure responses may occur due to:
- Invalid authentication credentials
- Invalid or unknown identifiers (for example ICCID or MSISDN)
- Invalid or missing parameters
- Values not permitted for the specified SIM type or account configuration
- Insufficient permissions
Integrating systems should validate input data before submission and implement appropriate error handling and logging.