Query Last Mobile-Originated Traffic
Purpose
Returns the most recent confirmed outbound (mobile-originated) traffic for the SIM specified in the <iccid> element.
This corresponds to the Last Outbound Traffic information shown in SIM Finder.
Important: This is not a live query to the SIM provider. The information is based on confirmed traffic records received from provider systems.
- Typically, traffic records are received once per day.
- Some providers may supply near real-time feeds. In those cases, the response will reflect the more recent data.
If no traffic information is available, the response elements will be returned empty.
Endpoint
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
Request (XML)
<query-last-mo-traffic version="1" api-id="123456">
<authentication>
<username>username</username>
<password>password</password>
</authentication>
<iccid>1234567890123456789</iccid>
</query-last-mo-traffic>Response (Success)
<query-last-mo-traffic-response api-id="123456">
<api-outcome>Success</api-outcome>
<traffic-type>data</traffic-type>
<timestamp>22/03/2020 13:55:30</timestamp>
<network>Vodafone</network>
<country>United Kingdom</country>
</query-last-mo-traffic-response>Response Elements
Element | Description |
|---|---|
<traffic-type> | The type of traffic: Data, SMS, or Voice. |
<timestamp> | The SMS received time, or the end time of a data session or voice call. Format: DD/MM/YYYY hh:mm:ss. All times are UTC. |
<network> | The network recorded for the traffic, where available. |
<country> | The country from which the traffic originated, where available. |
Behaviour Notes
- If any individual value is unavailable, the element will be returned empty.
- If the SIM has no traffic history, all elements will be returned empty.
- Time values are always returned in UTC.
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.