---
title: Query QR Info
slug: query-qr-info
createdAt: 2026-02-05T09:33:58.280Z
---

## 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&#x20;
- The current QR lifecycle status&#x20;

If a SIM does not have a QR code associated with it, the response will return **Invalid ICCID**.

### Endpoint

```xml
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
```



### Request (XML)

```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)

```xml
<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.&#x20;
- 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**.



:::hint{type="info"}
## Response (Failure)

If a request cannot be processed, the response will include:

- api-outcome indicating failure&#x20;
- An error description explaining the reason&#x20;

Failure responses may occur due to:

- Invalid authentication credentials&#x20;
- Invalid or unknown identifiers (for example ICCID or MSISDN)&#x20;
- Invalid or missing parameters&#x20;
- Values not permitted for the specified SIM type or account configuration&#x20;
- Insufficient permissions&#x20;

Integrating systems should validate input data before submission and implement appropriate error handling and logging.
:::

