Entity Information

Data type: DriverLog, fields list

URL: /api/DriverLogs

HTTP Method: POST

To create new DriverLog to the Trakopolis you need to pass JSON or XML-serialized DriverLog object with following properties filled:

PropertyRequiredTypeDefaultDescription
DriverIdYesNumeric-Driver Id
TerminalIdYesNumeric-Terminal Id
DriverStatusYesString-Driver Status. Must be equal to one of driver statuses
TimestampNoDateTimeCurrent date

Datetime of DriverLog event. UTC timezone only.

Dates from past are allowed to support data buffering. Current date will be used if date is omited or from future.

There should be at least 20ms difference between dates of subsequent Driver Log entries from the same terminal.

StatusNoStatus object-Status object with only 2 properties: Latitude and Longitude. If coordinates are unknown or invalid, either empty object or values -91 (Latitude) and -181 (Longitude) should be used.

There is a delay before driver log becomes available on the Trakopolis website and API server. The Trakopolis API server returns ApiStatusResult response if driver log is submitted for processing (Error code = NoError) or custom error code if an error has ocurred. Some errors may cause 4xx Http status code result. Please refer to the "Error Handling" section for more details. 

Json-based request examples

{
  "DriverID": 10,
  "DriverStatus": "Log In",
  "Status": {
   "Latitude": 51.04917,
   "Longitude": -114.06083
  },
  "TerminalId": 100,
  "Timestamp": "2014-10-30T14:52:48Z"
 }					
{
  "DriverID": 10,
  "DriverStatus": "Log Out",
  "TerminalId": 100
 }