| GET | /spytec/device/alerts | Get list of device alerts. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Imei | query | string | Yes | The Imei of the GPS device. |
| StartDate | query | DateTime | Yes | Start date to get the message list. |
| EndDate | query | DateTime | Yes | End date to get the message list. |
| Limit | query | int | No | Maximum number in one page of results. |
| NextToken | query | string | No | Pagination token received from previous query. |
| Types | query | string | Yes | Available alert types: Speeding, SOS, LowBattery, GeofenceEntry, GeofenceExit, Movement, TripExceedsDistance, TripExceedsDuration, TripStarted, TripFinished, StopExceedsDuration, Tow, IgnitionOn, IgnitionOff, StartedCharging, StoppedCharging, PluggedExternalPowerSource, UnpluggedExternalPowerSource. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Result | form | AlertResult | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Success | form | bool | No | |
| Message | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Items | form | List<SpytecAlert> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| alertType | form | string | No | |
| imei | form | string | No | |
| created | form | DateTime | No | |
| sendTime | form | DateTime | No | |
| userId | form | string | No | |
| coordinates | form | Coordinate | No | |
| address | form | string | No | |
| clientId | form | double | No | |
| alertId | form | double | No | |
| value | form | string | No | |
| isBuffer | form | bool | No | |
| isNotification | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| latitude | form | double | No | |
| longitude | form | double | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /spytec/device/alerts HTTP/1.1 Host: api.paylock.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"result":{"items":[{"alertType":"String","imei":"String","created":"\/Date(-62135596800000-0000)\/","sendTime":"\/Date(-62135596800000-0000)\/","userId":"String","coordinates":{"latitude":0,"longitude":0},"address":"String","clientId":0,"alertId":0,"value":"String","isBuffer":false,"isNotification":false}]},"success":false,"message":"String"}