| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| DeviceStatuses | query | int | Yes | A list of logged event statuses for a device. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ApplianceId | query | Guid | Yes | Guid of the Appliance this Device is logging an event status for. |
| DeviceId | query | Guid | Yes | Guid representing the saved Device |
| Latitude | query | double | Yes | The latitude the device was last located at. |
| Longitude | query | double | Yes | The longitude the device was last located at. |
| EventName | query | string | No | Name of the event we're logging. |
| EventDetail1 | query | string | No | Details of the event up to (255 char). |
| EventDetail2 | query | string | No | Details of the event up to (255 char). |
| EventDetail3 | query | string | No | Details of the event up to (255 char). |
| EventDetail4 | query | string | No | Details of the event up to (255 char). |
| EventDetail5 | query | string | No | Details of the event up to (255 char). |
| Orientation | query | string | No | Details of the event up to (255 char). |
| InternetConnectionStatus | query | string | No | The device internet connection status. |
| Log | query | string | No | Unlimited text field for logging details of the event. |
| Event | query | DateTime | No | Date and Time of the event. |
| IsInPortrait | query | bool | No | True if the device is in portrait mode. |
| IsInLandscape | query | bool | No | True if the device is in landscape mode. |
| CellularDataEnabled | query | bool | No | True if cellular data is enabled. |
| DataRoamingEnabled | query | bool | No | True if data roaming is enabled. |
| IsNetworkAvailable | query | bool | No | True if the network is available. |
| CanSendSMS | query | bool | No | True if the device can send an sms. |
| BatteryCharging | query | bool | No | True if the battery is charging. |
| BatteryLevel | query | int | No | The amount of battery life left as a percentage. |
| MediaFileId1 | query | Guid | No | The Guid of a saved Media Object. |
| MediaFileId2 | query | Guid | No | The Guid of a saved Media Object. |
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.
POST /json/reply/LogDeviceStatuses HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/json
Content-Type: application/json
Content-Length: length
{"DeviceStatuses":[{"ApplianceId":"00000000-0000-0000-0000-000000000000","DeviceId":"00000000-0000-0000-0000-000000000000","Latitude":0,"Longitude":0,"EventName":"String","EventDetail1":"String","EventDetail2":"String","EventDetail3":"String","EventDetail4":"String","EventDetail5":"String","Orientation":"String","InternetConnectionStatus":"String","Log":"String","Event":"0001-01-01T00:00:00.0000000","IsInPortrait":false,"IsInLandscape":false,"CellularDataEnabled":false,"DataRoamingEnabled":false,"IsNetworkAvailable":false,"CanSendSMS":false,"BatteryCharging":false,"BatteryLevel":0,"MediaFileId1":"00000000-0000-0000-0000-000000000000","MediaFileId2":"00000000-0000-0000-0000-000000000000"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}