| 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 .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
result:
{
items:
[
{
alertType: String,
imei: String,
created: 0001-01-01,
sendTime: 0001-01-01,
userId: String,
coordinates:
{
latitude: 0,
longitude: 0
},
address: String,
clientId: 0,
alertId: 0,
value: String,
isBuffer: False,
isNotification: False
}
]
},
success: False,
message: String
}