Purpose: Use this API to fetch a list of the HOS logs of the drivers. The Hours of Service (HOS) logs are important as part of the regulatory and compliance requirements. Ensuring drivers adhere to HOS regulations is vital for maintaining compliance with legal and regulatory requirements. Frequent violations can lead to disruptions, such as fines or penalties, and affect operational efficiency. Tracking violations helps in managing and mitigating these disruptions.
NOTE
For the query parameter
status
, you can use the following possible values:
all
compliant
hos
form_and_manner
missing_dvirs
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/logs')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
response = http.request(request)
puts response.read_body
Response Parameters
logs
- Type: Array of Objects
- Description: List of logs with detailed information.
log
-
Type: Object
-
Description: Details of a specific log entry.
id
- Type: Integer
- Description: Unique identifier for the log.
date
- Type: String
- Description: Date of the log.
total_miles
- Type: Integer
- Description: Total miles driven on the log date.
metric_units
- Type: Boolean
- Description: Indicates if metric units are used.
driver_signed_at
- Type: String
- Description: Timestamp when the driver signed the log.
driver_signature_url
- Type: String
- Description: URL to the driver's signature.
time_zone
- Type: String
- Description: Time zone for the log.
cycle
- Type: String
- Description: The cycle used in the log.
driver_first_name
- Type: String
- Description: Driver's first name.
driver_last_name
- Type: String
- Description: Driver's last name.
carrier_name
- Type: String
- Description: Carrier's name.
carrier_street
- Type: String
- Description: Carrier's street address.
carrier_city
- Type: String
- Description: Carrier's city.
carrier_state
- Type: String
- Description: Carrier's state.
carrier_zip
- Type: String
- Description: Carrier's ZIP code.
terminal_street
- Type: String
- Description: Terminal street address (if applicable).
terminal_city
- Type: String
- Description: Terminal city (if applicable).
terminal_state
- Type: String
- Description: Terminal state (if applicable).
terminal_zip
- Type: String
- Description: Terminal ZIP code (if applicable).
notes
- Type: String
- Description: Additional notes (if applicable).
driver_company_id
- Type: String
- Description: Driver's company ID (if applicable).
origin
- Type: String
- Description: Origin of the trip (if applicable).
destination
- Type: String
- Description: Destination of the trip (if applicable).
exception_24_hour_restart
- Type: Boolean
- Description: Indicates if the 24-hour restart exception was used.
exception_8_hour_break
- Type: Boolean
- Description: Indicates if the 8-hour break exception was used.
exception_wait_time
- Type: Boolean
- Description: Indicates if the wait time exception was used.
exception_short_haul
- Type: Boolean
- Description: Indicates if the short-haul exception was used.
short_haul
- Type: Boolean
- Description: Indicates if the driver operated under short-haul regulations.
eld_mode
- Type: String
- Description: Vehicle gateway mode that is present in the log.
co_driver_full_names
- Type: Array of Strings
- Description: Full names of co-drivers (if any).
odometers
- Type: Object
- Description: Details of odometer readings (if any).
trailer_numbers
- Type: String
- Description: Numbers of the trailers used.
vehicle_numbers
- Type: String
- Description: Numbers of the vehicles used.
off_duty_duration
- Type: Integer
- Description: Total time spent off-duty (in seconds).
on_duty_duration
- Type: Integer
- Description: Total time spent on-duty (in seconds).
sleeper_duration
- Type: Integer
- Description: Total time spent in the sleeper berth (in seconds).
driving_duration
- Type: Integer
- Description: Total time spent driving (in seconds).
waiting_duration
- Type: Integer
- Description: Total time spent waiting (in seconds).
driver
- Type: Object
- Description: Details of the driver associated with the log.
id
- Type: Integer
- Description: Unique identifier for the driver.
first_name
- Type: String
- Description: Driver's first name.
last_name
- Type: String
- Description: Driver's last name.
username
- Type: String
- Description: Driver's username.
email
- Type: String
- Description: Driver's email address (if applicable).
driver_company_id
- Type: String
- Description: Driver's company ID (if applicable).
status
- Type: String
- Description: Driver's status (e.g., active).
role
- Type: String
- Description: Driver's role.
vehicles
- Type: Array of Objects
- Description: List of vehicles associated with the log.
vehicle
-
Type: Object
-
Description: Details of a specific vehicle.
id
- Type: Integer
- Description: Unique identifier for the vehicle.
number
- Type: String
- Description: Vehicle number.
year
- Type: String
- Description: Year of the vehicle (if applicable).
make
- Type: String
- Description: Make of the vehicle (if applicable).
model
- Type: String
- Description: Model of the vehicle (if applicable).
vin
- Type: String
- Description: Vehicle Identification Number (VIN) (if applicable).
metric_units
- Type: Boolean
- Description: Indicates if metric units are used for the vehicle.
co_drivers
- Type: Array of Objects
- Description: List of co-drivers associated with the log.
co_driver
-
Type: Object
-
Description: Details of a specific co-driver.
id
- Type: Integer
- Description: Unique identifier for the co-driver.
first_name
- Type: String
- Description: Co-driver's first name.
last_name
- Type: String
- Description: Co-driver's last name.
username
- Type: String
- Description: Co-driver's username.
email
- Type: String
- Description: Co-driver's email address.
driver_company_id
- Type: String
- Description: Co-driver's company ID (if applicable).
status
- Type: String
- Description: Co-driver's status (e.g., active)
remarks
- Type: Array of Objects
- Description: List of remarks associated with the log.
remark
-
Type: Object
-
Description: Details of a specific remark.
id
- Type: Integer
- Description: Unique identifier for the remark.
time
- Type: String
- Description: Timestamp of the remark.
notes
- Type: String
- Description: Notes associated with the remark (if applicable).
location
- Type: String
- Description: Location associated with the remark (if applicable).
cycle_restarts
- Type: Array of Objects
- Description: List of cycle restarts associated with the log.
cycle_restart
-
Type: Object
-
Description: Details of a specific cycle restart.
id
- Type: Integer
- Description: Unique identifier for the cycle restart.
start_time
- Type: String
- Description: Start time of the cycle restart.
end_time
- Type: String
- Description: End time of the cycle restart.
type
- Type: String
- Description: Type of cycle restart (e.g., 34_hour).
name
- Type: String
- Description: Name of the cycle restart.
shipping_docs
- Type: String
- Description: Shipping document numbers associated with the log.
form_and_manner_errors
- Type: Array
- Description: List of form and manner errors (if any).
hos_violations
- Type: Array of Objects
- Description: List of Hours of Service (HOS) violations associated with the log.
hos_violation
-
Type: Object
-
Description: Details of a specific HOS violation.
id
- Type: Integer
- Description: Unique identifier for the HOS violation.
type
- Type: String
- Description: Type of HOS violation.
name
- Type: String
- Description: Name of the HOS violation.
start_time
- Type: String
- Description: Start time of the HOS violation.
end_time
- Type: String
- Description: End time of the HOS violation.
events
- Type: Array of Objects
- Description: List of events associated with the log.
event
-
Type: Object
-
Description: Details of a specific event.
id
- Type: Integer
- Description: Unique identifier for the event.
type
- Type: String
- Description: Type of event (e.g., driving, sleeper).
notes
- Type: String
- Description: Notes associated with the event (if applicable).
location
- Type: String
- Description: Location of the event (if applicable).
start_time
- Type: String
- Description: Start time of the event.
end_time
- Type: String
- Description: End time of the event.
is_manual
- Type: Boolean
- Description: Indicates if the event was manually entered.
inspection_reports
- Type: Array of Objects
- Description: List of inspection reports associated with the log.
inspection_report
-
Type: Object
-
Description: Details of a specific inspection report.
id
- Type: Integer
- Description: Unique identifier for the inspection report.
date
- Type: String
- Description: Date of the inspection.
time
- Type: String
- Description: Time of the inspection.
odometer
- Type: Integer
- Description: Odometer reading at the time of the inspection (if applicable).
carrier_name
- Type: String
- Description: Carrier's name.
vehicle_number
- Type: String
- Description: Vehicle number associated with the inspection.
trailer_nums
- Type: Array of Strings
- Description: Trailer numbers associated with the inspection.
location
- Type: String
- Description: Location of the inspection.
city
- Type: String
- Description: City of the inspection.
state
- Type: String
- Description: State of the inspection.
status
- Type: String
- Description: Status of the inspection (e.g., corrected).
mechanic_signed_at
- Type: String
- Description: Timestamp when the mechanic signed the inspection report.
mechanic_signature_url
- Type: String
- Description: URL to the mechanic's signature.
driver_signed_at
- Type: String
- Description: Timestamp when the driver signed the inspection report.
driver_signature_url
- Type: String
- Description: URL to the driver's signature.
reviewer_signed_at
- Type: String
- Description: Timestamp when the reviewer signed the inspection report.
reviewer_signature_url
- Type: String
- Description: URL to the reviewer's signature.
defects
-
Type: Array of Objects
-
Description: List of defects identified during the inspection.
defect
-
Type: Object
-
Description: Details of a specific defect.
id
- Type: Integer
- Description: Unique identifier for the defect.
area
- Type: String
- Description: Area of the vehicle where the defect was found.
category
- Type: String
- Description: Category of the defect.
notes
- Type: String
- Description: Additional notes about the defect (if applicable).
entries
-
Type: Array of Objects
-
Description: List of additional entries in the inspection report.
name
- Type: String
- Description: Name of the entry.
value
- Type: String
- Description: Value of the entry.
position
- Type: Integer
- Description: Position of the entry in the inspection report.