Skip to main content

Driver Status DutyStatusAvailability and DutyStatusAvailabilitySearch

RKoon-1279
Original Poster

I want to just get the status of the driver. No other stuff and really do not want to pass the date either. Just current status. I thought I would use the DutyStatusAvailability but it does not give me the current status.. Do I need to use the DutyStatusAvailabilitySearch  

Below is my code that works just to get availability but no status.

Ideas? Thoughts?

 

{ "method": "Get", "params": { "search": { "UserSearch": { "id": "*****" } }, "typeName": "DutyStatusAvailability", "credentials": { "database": "mydatabase", "path": "ThisServer", "sessionId": "mysessionid", "userName": "myusername" } } }

 

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

@RKoon_664​ Updated response.

 

You should be able to retrieve the status for the driver by making an API call to DutyStatusLog. You do need to provide a fromDate with the current date and time for getting the latest status along with the includeBoundaryLogs as true. This will retrieve the latest status for the driver.

 

{ "method": "Get", "params": { "typeName": "DutyStatusLog", "search": { "includeBoundaryLogs": "true", "userSearch": { "id": "MY_ID" }, "fromDate": "2022-01-31T19:29:14.018Z" }, "credentials": { "database": "DATABASE", "userName": "USERNAME", "sessionId": "SESSION_ID" } } }

 

 

1 Reply

@RKoon_664​ Updated response.

 

You should be able to retrieve the status for the driver by making an API call to DutyStatusLog. You do need to provide a fromDate with the current date and time for getting the latest status along with the includeBoundaryLogs as true. This will retrieve the latest status for the driver.

 

{ "method": "Get", "params": { "typeName": "DutyStatusLog", "search": { "includeBoundaryLogs": "true", "userSearch": { "id": "MY_ID" }, "fromDate": "2022-01-31T19:29:14.018Z" }, "credentials": { "database": "DATABASE", "userName": "USERNAME", "sessionId": "SESSION_ID" } } }

 

 

Still have questions?