The article includes:
This call retrieves totals for text (SMS) and data usage for the current service period and includes a list of daily totals if usage is present.
Note: MTD (month to date) refers to the billing period, not the calendar month.
URLs
Request URL (production) | https://prismproapi.koretelematics.com/4/TransactionalAPI.svc/json/queryDeviceUsageBySimNumber |
Request URL (sandbox) | https://prismproapi.sandbox.koretelematics.com/4/TransactionalAPI.svc/json/queryDeviceUsageBySimNumber |
Request method | Post |
Request
Field | Data type | Mandatory | Min length | Max length | Description |
simNumber | string | Y | 11 | 20 | The SIM number or ICCID. |
JSON request example
{
"simNumber": "89310380106023476395"
}
Response
Parameter name | Data type | Min length | Max length | Description |
requestStatus | int | Request status code (if unsuccessful). | ||
DataInBytesMtd | double | Data usage in bytes | ||
SimNumber | string | 11 | 50 | SIM or ICCID number. |
SmsMtd | int | Text messages to date for the month | ||
Usage:DataInBytes | bigint | Data usage in bytes. | ||
Usage:Sms | bigint | Number of text messages. | ||
Usage:UsageDate | datetime | Usage time and date. Use the Epoch Converter for the date stamp (remove -X000). |
JSON response example
{
"d": {
"__type": "QueryDeviceUsageResponse:https://PRiSMProAPI.koretelematics.com/types",
"DataInBytesMtd": 322981637,
"SimNumber": "12345678912345678912",
"SmsMtd": 10,
"Usage": [
{
"__type": "QueryDeviceUsageDetailRecord:https://PRiSMProAPI.koretelematics.com/types",
"DataInBytes": 94860722,
"Sms": 2,
"UsageDate": "/Date(1604030400000-0400)/"
},
{
"__type": "QueryDeviceUsageDetailRecord:https://PRiSMProAPI.koretelematics.com/types",
"DataInBytes": 602457,
"Sms": 6,
"UsageDate": "/Date(1604116800000-0400)/"
},
{
"__type": "QueryDeviceUsageDetailRecord:https://PRiSMProAPI.koretelematics.com/types",
"DataInBytes": 227518458,
"Sms": 2,
"UsageDate": "/Date(1604203200000-0400)/"
}
]
}
}