LogBook API

The LogBook API Provides LogBook and compliance-related information to 3rd party systems for partnership opportunities and customer solutions.This is done by enhancing Time Card Reporting, Fleet Maintenance, Fleet Management, Routing, and Dispatching systems with a driver's LogBook information.

      Compliance API is offered as a RESTful web service

      Standard REST verbs are applied: GET

      Throughout this document, we will reference the unique identifier to be invoked for each of the main objects available to be retrieved.The unique identifiers used within this API method set include:

o   Driver Number

Note- The returned response will be restricted to the Reveal account's data plan. If the information being queried is outside of the data plan, a "400 Bad Request error "response will be returned.

For more details on your account's data plan please reach out to Verizon Connect Customer Support

 

API Summary Details

API Name

LogBook API

Endpoint

https://fim.api.us.fleetmatics.com/logbook

Operation

GET

 

GET LogBook Status

The integrated user will be able to retrieve either the current or historical backlog of a specific driverís LogBook status.

 

GET Current LogBook Status by Driver

The current LogBook status can be obtained by providing an existing driver number within the REVEAL account.

 

GET Current LogBook Status by Driver Request Header

Operation and Path

GET https://fim.api.us.fleetmatics.com/logbook/v1/driver/<drivernumber>/statuscurrent

HOST

https://fim.api.us.fleetmatics.com

Accept

application/json, xml

Authorization

Atmosphere realm=http://atmosphere,atmosphere_app_id=<Integration Manager App ID>, Bearer <token>

Note: The Token API must be called in order to retrieve a valid token to provide to all subsequent calls

 

GET Current LogBook Status by Driver Sample Response

{

    "Status": "OnDutyNotDriving",

    "SubStatus": "OffDuty30MinBreak",

    "StatusDateTimeUTC": "2017-06-20T19:35:24.46",

    "StatusDurationSeconds": 88,

    "UpdateDatetTimeUTC": "2017-06-20T19:35:24.45",

    "TrailerNumber": [

        "999999"

    ],

    "ShippingReference": [

        "8888888"

    ],

    "Remark": null,

    "Address": null,

    "ModifiedBy": "Last Updated By Test User",

    "DriverNumber": "99",

    "FirstName": "Driver First Name",

    "LastName": "Driver Last Name",

    "VehicleNumber": "85",

    "VehicleName": "Vehicle 85",

††† "TimeRemainingSinceLastStatus":{

††††††††† "DailyDrivingMinutes":45,

††††††††† "DailyOnDutyMinutes":15

††† },

††† "TimeUsedSinceLastReset":{

†††††††† "DailyDrivingMinutes":50,

†††††††† "DailyOnDutyMinutes":10

†† },

    "_links": {

        "current": {

            "href": "http://api.us.fleetmatics.com/logbook/v1/status/99/current"

        },

        "driver": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/drivers/99"

        },

        "vehicle": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/vehicles/"

        },

        "logbooksettings": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/driversettings/logbooksettings/99"

        }

    }

}

 

GET Current LogBook Status by Driver Response Field Breakdown

Field

JSON Formatted Sample

Field Notes and Default Values

Status

{

    "Status": "OnDutyNotDriving",

The current driver condition that is either entered by the driver through the LogBook App or proposed by an admin within the REVEAL account:

       On duty driving: Indicates the driver is on duty and driving.This setting is automatically enabled when the vehicle is driven

       On duty not driving: Indicates the driver is logging Hours of Service but is not driving

       Off duty: The driver is not currently logging hours of service due to a break or daily reset

       Sleeper berth: Typically, the driver is in the sleeper cabin and is not logging service due to a break or daily reset

Sub Status

†††† "SubStatus": "OffDuty30MinBreak",

   

Depending on the main status that is set in the LogBook App, one of the following sub statuses can be applied:

On duty driving: There is no sub status as ON DUTY DRIVING is automatically enabled.

On duty not driving:

       Unloading

       Loading

       Inspection

       Fueling

       Yard Moves (ELD Only)

Off duty:

       Split Break

       30 Minute Break

       Daily Reset

       No Sub Status

       Personal Use (ELD Only)

Sleeper berth:

       Split Break

       30 Minute Break

       Daily Reset

       No Sub Status

Status Date and Time UTC

††† "StatusDateTimeUTC": "2017-06-20T19:35:24.46",

 

This is the timestamp of the status change. It should be taken from the device time and sent to the REVEAL as a UTC time.

Status Duration Seconds

    "StatusDurationSeconds": 88,

 

Length of time (in seconds) the current status has been in effect.

Update Date and Timestamp (UTC)

    "UpdateDatetTimeUTC": "2017-06-20T19:35:24.45",

The timestamp value for when the updated Status was received by REVEAL.

Trailer Number

    "TrailerNumber": [

        "999999"

    ],

Reference identifier associated with the trailer entered within the LogBook App.

Shipping Reference

    "ShippingReference": [

        "8888888"

    ],

Reference number/identifier associated with shipping stops for a particular vehicle entered in the LogBook app.

Remark

    "Remark": null,

   

Additional comments related to the status update that is entered within the LogBook App.

Address

†††† "Address": {

††††††† "AddressLine1": "31500 Bainbridge Rd",

††††††† "AddressLine2": "",

††††††† "Locality": "Solon",

††††††† "AdministrativeArea": "OH",

††††††† "PostalCode": "44139",

††††††† "Country": "USA"

†††††† },

This is the address is related to the location entered within the LogBook app for when the status was updated or changed.Address contains the global standards for address components:

       Address Line 1: location specific identification such as a house number

       Address Line 2: additional information to identify location such as an apartment number

       Locality: city, town, etc.

       Administrative Area: state, province, etc.

       Postal Code

       Country

Modified by

    "ModifiedBy": "Last updated by Test User",

   

The individual who most recently modified the LogBook Status.This should reflect the hover-over information displayed from the UI regarding if a status was updated.

Driver Number

††† "DriverNumber": "99",

 

Driver Number is the unique identifier for Drivers created within REVEAL.This is the same identifier provided in the GET request call in order to return the desired LogBook information.

 

If the provided Driver Number does not exist within the REVEAL account, a 404 error will be returned.

Driver First Name

    "FirstName": " Driver 99",

   

The first name of the driver as recorded within the REVEAL vehicle profile.

Driver Last Name

††† "LastName": "test",

   

The last name of the driver as recorded within the REVEAL vehicle profile.

Vehicle Number

††† "VehicleNumber": "85",

   

Vehicle Number is the unique identifier for Vehicles created within REVEAL.

Vehicle Name

"VehicleName": "Vehicle 85",

The Vehicle Name as recorded within the REVEAL vehicle profile.

Time Remaining Since Last Status

††† "TimeRemainingSinceLastStatus":{

††††††††† "DailyDrivingMinutes":45,

††††††††† "DailyOnDutyMinutes":15,

††† },

Time Remaining Since Last Status:

       Daily Driving Minutes: This will show the time this driver has left to drive today, at the point the status change was struck, before they will get a violation for exceeding the amount of time they can drive that day.

       Daily On Duty Minutes: This will show the time this driver has left on duty today, at the point the status change was struck. They will get a violation if they drive after this time.

Time Used Since Last Reset

††† "TimeUsedSinceLastReset":{

††††††††† "DailyDrivingMinutes":50,

††††††††† "DailyOnDutyMinutes":10,

††† },

Time Used Since Last Reset:

       Daily Driving Minutes: This will show the total time the driver has driven today since the last daily reset.

       Daily On Duty Minutes: This will show the total time since the last daily reset.

Links Collection

    "_links": {

        "current": {

            "href": "http://api.us.fleetmatics.com/logbook/v1/driver/99/statuscurrent"

        },

        "driver": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/drivers/99"

        },

        "vehicle": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/vehicles/"

        },

        "logbooksettings": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/driversettings/

†††††††††††† logbooksettings/99"

        }

    }

}

The following supplemental API links are available for additional reference:

Current driverís logbook status.

Current driver number and name.

Current vehicle number and name.

Current driverís LogBook Settings:

       Current Rule Set

       Is ELD

Boolean field

 

 

 

GET LogBook Status History by Driver

The LogBook Status History by Driver method is available for integrated user to retrieve a driverís duty status, vehicle and driver information for a 24-hour period.

 

The user must provide a valid Driver Number along with a Start Date and Time.The response will include the LogBook status information for a 24-hour period starting with the date and time value entered.The Start Date and Time must be within 365 days of the current date of the request being made.

 

GET LogBook Status History by Driver Request Header

Operation and Path

GET https://fim.api.us.fleetmatics.com/logbook/v1/driver/<drivernumber>/ statushistory?startDateTimeUtc=<0000-00-00T00:00:0000>

HOST

https://fim.api.us.fleetmatics.com

Accept

application/json, xml

Authorization

Atmosphere realm=http://atmosphere,atmosphere_app_id=<Integration Manager App ID>, Bearer <token>

Note: The Token API must be called in order to retrieve a valid token to provide to all subsequent calls.

 

GET LogBook Status History by Driver Sample Response

{

††† "DistanceInKm": "1000",   

††† "Status": "OnDutyNotDriving",

    "SubStatus": "OffDuty30MinBreak",

    "StatusDateTimeUTC": "2017-06-20T19:35:24.46",

    "StatusDurationSeconds": 88,

 †† "UpdateDatetTimeUTC": "2017-06-20T19:35:24.45",

     "TrailerNumber": [

        "999999"

    ],

    "ShippingReference": [

        "8888888"

    ],

    "Remark": null,

    "Address": null,

    "ModifiedBy": "Last updated by Test User",

    "DriverNumber": "99",

    "FirstName": "Driver First Name",

    "LastName": "Driver Last Name",

    "VehicleNumber": "85",

    "VehicleName": "Vehicle 85",

††† "TimeRemainingSinceLastStatus":{

††††††††† "DailyDrivingMinutes":45,

††††††††† "DailyOnDutyMinutes":15

††† },

††† "TimeUsedSinceLastReset":{

†††††††† "DailyDrivingMinutes":50,

†††††††† "DailyOnDutyMinutes":10

†† },

    "_links": {

        "current": {

            "href": "http://api.us.fleetmatics.com/logbook/v1/status/99/current"

        },

        "driver": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/drivers/99"

        },

        "vehicle": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/vehicles/

        },

        "logbooksettings": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/driversettings/logbooksettings/99"

        }

    }

}

GET LogBook Status History by Driver Response Field Breakdown

Field

JSON Formatted Sample

Field Notes and Default Values

Distance In Km

  "DistanceInKm": "1000",

 

The number of kilometers the current status has been in effect for.

Status

{

    "Status": "OnDutyNotDriving",

The current driver condition that is either entered by the driver through the LogBook App or proposed by an admin within the REVEAL account:

       On duty driving: Indicates the driver is on duty and driving.This setting is automatically enabled when the vehicle is driven

       On duty not driving: Indicates the driver is logging Hours of Service but is not driving

       Off duty: The driver is not currently logging hours of service due to a break or daily reset

       Sleeper berth: Typically, the driver is in the sleeper cabin and is not logging service due to a break or daily reset

Sub Status

†††† "SubStatus": "OffDuty30MinBreak",

   

Depending on the main status that is set in the LogBook App, one of the following sub statuses can be applied:

On duty driving: No sub status as ON DUTY DRIVING is automatically enabled.

On duty not driving:

       Unloading

       Loading

       Inspection

       Fueling

       Yard Moves (ELD Only)

Off duty:

       Split Break

       30 Minute Break

       Daily Reset

       No Sub Status

       Personal Use (ELD Only)

Sleeper berth:

       Split Break

       30 Minute Break

       Daily Reset

       No Sub Status

Status Date and Time UTC

††† "StatusDateTimeUTC": "2017-06-20T19:35:24.46",

 

This is the timestamp of the status change. It should be taken from the device time and sent to the REVEAL as a UTC time.

Status Duration Seconds

    "StatusDurationSeconds": 88,

 

Length of time (in seconds) the current status has been in affect.

Update Date and Timestamp (UTC)

    "UpdateDatetTimeUTC": "2017-06-20T19:35:24.45",

 

The timestamp value for when the updated Status was received by REVEAL.

Trailer Number

    "TrailerNumber": [

        "999999"

    ],

Reference identifier associated with the trailer entered within the LogBook App.

Shipping Reference

    "ShippingReference": [

        "8888888"

    ],

Reference number/identifier associated with shipping stops for a particular vehicle entered in the LogBook app.

Remark

    "Remark": null,

   

Additional comments related to the status update that is entered within the LogBook App.

Address

†††† "Address": null,

†††† "Address": {

††††††† "AddressLine1": "31500 Bainbridge Rd",

††††††† "AddressLine2": "",

††††††† "Locality": "Solon",

††††††† "AdministrativeArea": "OH",

††††††† "PostalCode": "44139",

††††††† "Country": "USA"

†††††† },

This is the address is related to the location entered within the LogBook app for when the status was updated or changed.Address contains the global standards for address components:

       Address Line 1 Ė location specific identification such as a house number

       Address Line 2 Ė additional information to identify location such as an apartment number

       Locality Ė city, town, etc.

       Administrative Area Ė state, province, etc.

       Postal Code

       Country

Modified by

    "ModifiedBy": "Last updated by Test User",

   

The individual who most recently modified the LogBook Status.This should reflect the hover-over information displayed from the UI regarding if a status was updated.

Driver Number

††† "DriverNumber": "99",

 

Driver Number is the unique identifier for Drivers created within REVEAL.This is the same identifier provided in the GET request call in order to return the desired LogBook information.

If the provided Driver Number does not exist within the REVEAL account, a 404 error will be returned.

Driver First Name

    "FirstName": " Driver 99",

The first name of the driver as recorded within the REVEAL vehicle profile.

Driver Last Name

††† "LastName": "test",

The last name of the driver as recorded within the REVEAL vehicle profile.

Vehicle Number

††† "VehicleNumber": "85",

Vehicle Number is the unique identifier for Vehicles created within REVEAL.

Vehicle Name

"VehicleName": "Vehicle 85",

The Vehicle Name as recorded within the REVEAL vehicle profile.

Time Remaining Since Last Status

††† "TimeRemainingSinceLastStatus":{

††††††††† "DailyDrivingMinutes":45,

††††††††† "DailyOnDutyMinutes":15,

††† },

Time Remaining Since Last Status:

       Daily Driving Minutes: This will show the time this driver has left to drive today, at the point the status change was struck, before they will get a violation for exceeding the amount of time they can drive that day.

       Daily On Duty Minutes: This will show the time this driver has left on duty today, at the point the status change was struck. They will get a violation if they drive after this time.

Time Used Since Last Reset

††† "TimeUsedSinceLastReset":{

††††††††† "DailyDrivingMinutes":50,

††††††††† "DailyOnDutyMinutes":10,

††† },

Time Used Since Last Reset:

       Daily Driving Minutes: This will show the total time the driver has driven today since the last daily reset

       Daily On Duty Minutes: This will show the total time since the last daily reset

Links Collection

    "_links": {

        "current": {

            "href": "http://api.us.fleetmatics.com/LBK/v1/status/99/current"

        },

        "driver": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/drivers/99"

        },

        "vehicle": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/vehicles/85"

        },

        "logbooksettings": {

            "href":"http://api.us.fleetmatics.com/CMD/v1/driversettings/

††††††††††††† logbooksettings/99"

        }

    }

}

 

The following supplemental API links are available for additional reference:

Current driverís logbook status.

Current driver number and name.

Current vehicle number and name.

Current driverís LogBook Settings:

       Current Rule Set

       Is ELD

Boolean field

 

 

GET Time Remaining by Driver

The GET Time Remaining method will return Hours of Service (HOS) for a driver against the ruleset or cycle

The integrated user is required to provide a valid Driver Number. The response will include driverís last status in date and time along with the number of driving hours left for today and weekly against his rule set

GET Driverís remaining HOS against cycle rule Request Header

Operation and Path

GET https://fim.api.us.fleetmatics.com/logbook/v1/driver/<drivernumber>/remainingtime

HOST

https://fim.api.us.fleetmatics.com

Accept

application/json, xml

Authorization

Atmosphere realm=http://atmosphere,atmosphere_app_id=<Integration Manager App ID>, Bearer <token>

Note: The Token API must be called in order to retrieve a valid token to provide to all subsequent calls

 

GET Driverís remaining HOS against cycle rule Sample Response

{

   "DriverNumber": "c_3379569",

   "FirstName": "Driver First Name",

   "LastName": "Driver Last Name ",

   "VehicleNumber": "34343423",

   "VehicleName": "Vehicle85",

   "RuleCycle": 8,

   "HoursAgainstRuleSet": {

       "DrivingLeftForToday": 11.666667,

       "CycleTimeLeft": 59.9833336

   },

   "LastStatus": "OnDutyNotDriving",

   "LastStatusDateTimeUTC": "2019-08-07T06:48:02.88",

   "HoursRemainingSinceLastStatus": {

       "DailyDrivingMinutes": 700,

       "DailyOnDutyMinutes": 900

   },

   "_links": {

       "remainingtime": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/logbook/v1/driver/c_3379569/remainingtime"

   },

       "driver": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/drivers/c_3379569"

   },

       "vehicle": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/vehicles/34343423"

   },

       "logbooksettings": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/driversettings/logbooksettings/c_3379569"

   }

   }

}

GET Time Remaining by Driver Response Field Breakdown

Field

JSON Formatted Sample

Field Notes and Default Values

Last Status

{

††††††††††† "Last Status": "OnDutyNotDriving",

The current driver condition that is either entered by the driver through the LogBook App or proposed by an admin within the REVEAL account. It shows the last status that we received from the app :

∑   On duty driving: Indicates the driver is on duty and driving.  This setting is automatically enabled when the vehicle is driven

∑   On duty not driving: Indicates the driver is logging Hours of Service but is not driving

∑   Off duty: The driver is not currently logging hours of service due to a break or daily reset

Sleeper berth: Typically, the driver is in the sleeper cabin and is not logging service due to a break or daily reset

Last Status Date and Time UTC

    "Last StatusDateTimeUTC": "2019-08-07T06:48:02.88",

 

This is the timestamp of the status change. It should be taken from the device time and sent to the REVEAL as a UTC time.  The remaining time can be calculated considering the last status time and date. 

Example Ė

Call time Ė 9:45 pm

Remaining hours -2

Went into driving Ė 9:30

As per the call time we know that the time remaining is actually 1 hours and 45 mins since last update was at 9:30

Driver Number

    "DriverNumber": " c_3379569 ",

 

Driver Number is the unique identifier for Drivers created within REVEAL.  This is the same identifier provided in the GET request call in order to return the desired LogBook information.

 

If the provided Driver Number does not exist within the REVEAL account, a 404 error will be returned.

Driver First Name

    "FirstName": " Driver First Name",

   

The first name of the driver as recorded within the REVEAL vehicle profile.

Driver Last Name

    "LastName": "Driver Last Name",

   

The last name of the driver as recorded within the REVEAL vehicle profile.

Vehicle Number

    "VehicleNumber": " 34343423 ",

   

Vehicle Number is the unique identifier for Vehicles created within REVEAL.

Vehicle Name

 

"VehicleName": " Vehicle85",

The Vehicle Name as recorded within the REVEAL vehicle profile.

Rule Cycle   

  "RuleCycle": 8,

Shows last Rule Cycle for Driver (Number of days)

Driver Information not found 

{

   "Message": "Driver Information not found for DriverNumber: c_3379579"

}

If the provided driver number is incorrect, the method will return  an error message

Vehicle currently not assigned to the driver 

{

  "DriverNumber": "c_3379569",

  "FirstName": "Gabriel",

  "LastName": "Test",

  "VehicleNumber": null,

  "VehicleName": null,

  "RuleCycle": 8,

  "HoursAgainstRuleSet": {

      "DrivingLeftForToday": 11.666667,

      "CycleTimeLeft": 59.9833336

  }

If there is no assignment against the provided number, the method will return the vehicle number and vehicle name as null 

Hours against rule set

{

   †††††††† "DrivingLeftForToday": 11.666667,                              

   †††††††† "CycleTimeLeft": 59.9833336

   },

Shows driving time in hours left for today and total weekly driving time in hours left against the rule cycle

Hours Remaining Since Last Status

    "Hours RemainingSinceLastStatus":{

      ††††† "DailyDrivingMinutes":700,

      ††††† "DailyOnDutyMinutes":900,

††††††††††† },

Hours Remaining Since Last Status:

       Daily Driving Minutes: This will show the time this driver has left to drive today, at the point the status change was struck, before they will get a violation for exceeding the amount of time, they can drive that day.

       Daily On Duty Minutes: This will show the time this driver has left on duty today, at the point the status change was struck. They will get a violation if they drive after this time.

Links Collection

"_links": {

       "remainingtime": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/logbook/v1/driver/c_3379569/remainingtime"

   †††††††† },

       "driver": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/drivers/c_3379569"

   †††††††† },

       "vehicle": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/vehicles/34343423"

   †††††††† },

       "logboo

ksettings": {

           "href": "https://fim-smoke.api.us.fleetmatics.com/cmd/v1/driversettings/logbooksettings/c_3379569"   ††††††††††† }

   }

}

The following supplemental API links are available for additional reference:

Current remaining time

Current driver number and name.

Current vehicle number and name.

Current driverís LogBook Settings:

       Current Rule Set

       Is ELD

Boolean field

 

 Note - The method is refreshed every time a driverís driving status is changed

.