Query IMEI
Purpose
Returns device IMEI information associated with the SIM specified in the <iccid> element.
This request retrieves the most recently detected IMEI, when it was first recorded, and the previously recorded IMEI where available.
Endpoint
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
Request (XML)
<query-imei version="1" api-id="123456">
<authentication>
<username>username</username>
<password>password</password>
</authentication>
<iccid>1234567890123456789</iccid>
</query-imei>Response (Success)
<query-imei-response api-id="123456">
<api-outcome>Success</api-outcome>
<current-imei>359827045164210</current-imei>
<last-change>22/03/2020 13:55:30</last-change>
<previous-imei>862057044700000</previous-imei>
</query-imei-response>Response Elements
Element | Description |
|---|---|
<current-imei> | The current 15-digit IMEI where available. |
<last-change> | The date and time when the current IMEI was first detected. Format: DD/MM/YYYY hh:mm:ss. All times are UTC. |
<previous-imei> | The previously recorded 15-digit IMEI where available. |
If no information is available for an element, it will be returned empty. For example, if a SIM has only ever been used in one device, <previous-imei> will be empty.
Behaviour Notes
- IMEI detection is network dependent. Not all networks support IMEI reporting.
- Some networks only record the IMEI after certain events (for example, completion of a successful data session).
- <last-change> reflects when the IMEI was recorded by the network, not when the SIM was physically inserted into the device.
- Some networks report IMEIs in a 16-digit format including a software version number. The API converts this to the standard 15-digit format (14 digits plus Luhn check digit) before returning it.
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.