List company drivers' HOS logs
require 'uri'
require 'net/http'
url = URI('https://keeptruckin.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
Responses based on enabled features on inspection reports
Depending upon the features enabled for your company you will receive variations in the response payload for the inspection_reports
as per the details given below,
If you have Custom Defect List feature enabled and the driver has used the inspection form with Custom Defect List enabled, you will receive defects
object inside every object in inspected_parts
array which specifies the type of defect. title
specifies the name of the defect selected by the driver for a part, whereas severity
defines if the selected defect is a major
or minor
defect. If any of the defect selected for a part by the driver has severity as major the part will be considered to have a major defect.
If you have Defect Level Resolution feature enabled you will receive mechanic_details
in objects inside theinspected_parts
array along with the status
of the part. Please note mechanic_signature_url
and mechanic_signed_at
values at the inspection_report
object level will be null
, since the mechanic details are contained inside every inspected_part
. The status of a part can be one of these values open
, repaired
, no_repair_needed
and good
. Also note that, you will receive resolver
object inside the mechanic_details
object and a mechanic_name
inside mechanic_details
separately, here mechanic
object specifies the logged in user(dispatcher/fleet manager) where as mechanic_name
is the name entered(could be different from the logged in user) while resolving the defect.
If you have Defect Level Resolution enabled, the external_resolver_id
serves as an identifier for the resolver within your system. This will be supplied back in Motive's public APIs related to inspection reports only and will not be visible on the dashboard.
{
"logs": [
{
"log": {
"id": 47,
"date": "2016-11-22",
"total_miles": 300,
"metric_units": false,
"driver_signed_at": "2016-07-16T00:05:21Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/log/driver_signature_upload/47/open-uri20160729-30633-1jeoj77?AWSAccessKeyId=AKIAJHHsdfsTJMZBMLQ&Expires=1485085850&Signature=YXqKF9nyfJI%2qEEq3obOLlFzsuKs0%3D",
"time_zone": "Pacific Time (US & Canada)",
"cycle": "70_8",
"driver_first_name": "Demo",
"driver_last_name": "Driver",
"carrier_name": "Demo Carrier",
"carrier_street": "415 Truckin St.",
"carrier_city": "San Francisco",
"carrier_state": "CA",
"carrier_zip": "94105",
"terminal_street": null,
"terminal_city": null,
"terminal_state": null,
"terminal_zip": null,
"notes": null,
"driver_company_id": null,
"origin": null,
"destination": null,
"exception_24_hour_restart": false,
"exception_8_hour_break": false,
"exception_wait_time": false,
"exception_short_haul": false,
"short_haul": false,
"eld_mode": "logs",
"co_driver_full_names": [
],
"odometers": {
},
"trailer_numbers": "17",
"vehicle_numbers": "12345, 12",
"off_duty_duration": 43200,
"on_duty_duration": 7200,
"sleeper_duration": 0,
"driving_duration": 21600,
"waiting_duration": 0,
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": null,
"status": "active",
"role": "driver"
},
"vehicles": [
{
"vehicle": {
"id": 11,
"number": "12345",
"year": null,
"make": null,
"model": null,
"vin": null,
"metric_units": true
}
}
],
"co_drivers": [
{
"co_driver": {
"id": 33,
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"email": "[email protected]",
"driver_company_id": null,
"status": "active",
"role": "driver"
}
}
],
"remarks": [
{
"remark": {
"id": 1,
"time": "2016-10-16T23:59:59Z",
"notes": null,
"location": null
}
}
],
"cycle_restarts": [
{
"cycle_restart": {
"id": 1,
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T05:00:00Z",
"type": "34_hour",
"name": "34 Hour"
}
}
],
"shipping_docs": "123ABC",
"form_and_manner_errors": [
],
"hos_violations": [
{
"hos_violation": {
"id": 12,
"type": "canada_driving_13",
"name": "13 Hour Driving Limit",
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T07:00:00Z"
}
}
],
"events": [
{
"event": {
"id": 221,
"type": "driving",
"notes": null,
"location": "Mobile, AL",
"start_time": "2016-10-16T07:00:00Z",
"end_time": "2016-10-16T09:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 474,
"type": "sleeper",
"notes": null,
"location": null,
"start_time": "2016-10-16T09:00:00Z",
"end_time": "2016-10-16T11:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 475,
"type": "driving",
"notes": null,
"location": null,
"start_time": "2016-10-16T11:00:00Z",
"end_time": "2016-10-17T07:00:00Z",
"is_manual": false
}
}
],
"inspection_reports": [
{
"inspection_report": {
"id": 9,
"log_id": 47,
"date": "2016-07-22",
"time": "2016-07-22T14:00:00Z",
"odometer": 253,
"inspection_duration": 300,
"carrier_name": "Demo Carrier",
"location": "Omaha, NE",
"status": "corrected",
"mechanic_signed_at": "2016-07-22T14:00:00Z",
"mechanic_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/mechanic_signature_upload/9/open-uri20160712-30633-thc30n?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"driver_signed_at": "2016-07-22T14:00:00Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/driver_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"reviewer_signed_at": "2016-07-22T14:00:00Z",
"reviewer_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/reviewer_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"entity_num": "entity_num",
"entity_type": "vehicle",
"is_rejected": false,
"inspection_type": "pre-trip",
"declaration": "I declare that this vehicle has been inspected in accordance with the applicable requirements.",
"inspected_parts": [
{
"id": 5,
"category": "Brakes",
"notes": "notes",
"type": "major",
"picture_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/defect/picture_upload/23137/15c31555-6642-4215-a3cd-81def1d329012396939324379336808.jpg?X"
}
],
"not_inspected_parts": [
{
"category": "9 - Emergency Equipment & Safety Devices"
},
{
"category": "15 - Heater/Defroster"
}
],
"vehicle": {
"id": 4,
"number": "Demo Vehicle",
"year": "2016",
"make": "Demo",
"model": "Vehicle",
"vin": "WP0AB2966NS458669",
"metric_units": false
},
"asset": {
"id": 101,
"make": "Toyota",
"metric_units": true,
"model": "Camry",
"name": "V123",
"year": 2022
},
"mechanic": {
"id": 12,
"first_name": "Joe",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"reviewer": {
"id": 13,
"first_name": "John",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"external_ids": [
{
"external_id": "201",
"integration_name": "generic_tms"
},
{
"external_id": "Truck123",
"integration_name": "generic_maintenance_system"
}
],
"entries": [
{
"name": "Tractor Plate #",
"value": "2743186",
"position": 1
},
{
"name": "Trailer Plate #",
"value": "T473278",
"position": 2
}
]
}
}
]
}
}
],
"pagination": {
"per_page": 25,
"page_no": 1,
"total": 1
}
}
{
"logs": [
{
"log": {
"id": 47,
"date": "2016-11-22",
"total_miles": 300,
"metric_units": false,
"driver_signed_at": "2016-07-16T00:05:21Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/log/driver_signature_upload/47/open-uri20160729-30633-1jeoj77?AWSAccessKeyId=AKIAJHHsdfsTJMZBMLQ&Expires=1485085850&Signature=YXqKF9nyfJI%2qEEq3obOLlFzsuKs0%3D",
"time_zone": "Pacific Time (US & Canada)",
"cycle": "70_8",
"driver_first_name": "Demo",
"driver_last_name": "Driver",
"carrier_name": "Demo Carrier",
"carrier_street": "415 Truckin St.",
"carrier_city": "San Francisco",
"carrier_state": "CA",
"carrier_zip": "94105",
"terminal_street": null,
"terminal_city": null,
"terminal_state": null,
"terminal_zip": null,
"notes": null,
"driver_company_id": null,
"origin": null,
"destination": null,
"exception_24_hour_restart": false,
"exception_8_hour_break": false,
"exception_wait_time": false,
"exception_short_haul": false,
"short_haul": false,
"eld_mode": "logs",
"co_driver_full_names": [
],
"odometers": {
},
"trailer_numbers": "17",
"vehicle_numbers": "12345, 12",
"off_duty_duration": 43200,
"on_duty_duration": 7200,
"sleeper_duration": 0,
"driving_duration": 21600,
"waiting_duration": 0,
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": null,
"status": "active",
"role": "driver"
},
"vehicles": [
{
"vehicle": {
"id": 11,
"number": "12345",
"year": null,
"make": null,
"model": null,
"vin": null,
"metric_units": true
}
}
],
"co_drivers": [
{
"co_driver": {
"id": 33,
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"email": "[email protected]",
"driver_company_id": null,
"status": "active",
"role": "driver"
}
}
],
"remarks": [
{
"remark": {
"id": 1,
"time": "2016-10-16T23:59:59Z",
"notes": null,
"location": null
}
}
],
"cycle_restarts": [
{
"cycle_restart": {
"id": 1,
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T05:00:00Z",
"type": "34_hour",
"name": "34 Hour"
}
}
],
"shipping_docs": "123ABC",
"form_and_manner_errors": [
],
"hos_violations": [
{
"hos_violation": {
"id": 12,
"type": "canada_driving_13",
"name": "13 Hour Driving Limit",
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T07:00:00Z"
}
}
],
"events": [
{
"event": {
"id": 221,
"type": "driving",
"notes": null,
"location": "Mobile, AL",
"start_time": "2016-10-16T07:00:00Z",
"end_time": "2016-10-16T09:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 474,
"type": "sleeper",
"notes": null,
"location": null,
"start_time": "2016-10-16T09:00:00Z",
"end_time": "2016-10-16T11:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 475,
"type": "driving",
"notes": null,
"location": null,
"start_time": "2016-10-16T11:00:00Z",
"end_time": "2016-10-17T07:00:00Z",
"is_manual": false
}
}
],
"inspection_reports": [
{
"inspection_report": {
"id": 9,
"log_id": 47,
"date": "2016-07-22",
"time": "2016-07-22T14:00:00Z",
"odometer": 253,
"inspection_duration": 300,
"carrier_name": "Demo Carrier",
"location": "Omaha, NE",
"status": "corrected",
"mechanic_signed_at": "2016-07-22T14:00:00Z",
"mechanic_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/mechanic_signature_upload/9/open-uri20160712-30633-thc30n?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"driver_signed_at": "2016-07-22T14:00:00Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/driver_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"reviewer_signed_at": "2016-07-22T14:00:00Z",
"reviewer_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/reviewer_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"entity_num": "entity_num",
"entity_type": "vehicle",
"is_rejected": false,
"inspection_type": "pre-trip",
"declaration": "I declare that this vehicle has been inspected in accordance with the applicable requirements.",
"inspected_parts": [
{
"id": 5,
"category": "Brakes",
"notes": "notes",
"type": "major",
"picture_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/defect/picture_upload/23137/15c31555-6642-4215-a3cd-81def1d329012396939324379336808.jpg?X",
"defects": [
{
"title": "Air pressure gauge failure",
"severity": "major"
},
{
"title": "Slow air pressure build up rate",
"severity": "major"
},
{
"title": "Air loss rate exceeds prescribed limit",
"severity": "minor"
}
]
}
],
"not_inspected_parts": [
{
"category": "9 - Emergency Equipment & Safety Devices"
},
{
"category": "15 - Heater/Defroster"
}
],
"vehicle": {
"id": 4,
"number": "Demo Vehicle",
"year": "2016",
"make": "Demo",
"model": "Vehicle",
"vin": "WP0AB2966NS458669",
"metric_units": false
},
"asset": {
"id": 101,
"make": "Toyota",
"metric_units": true,
"model": "Camry",
"name": "V123",
"year": 2022
},
"mechanic": {
"id": 12,
"first_name": "Joe",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"reviewer": {
"id": 13,
"first_name": "John",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"external_ids": [
{
"external_id": "201",
"integration_name": "generic_tms"
},
{
"external_id": "Truck123",
"integration_name": "generic_maintenance_system"
}
],
"entries": [
{
"name": "Tractor Plate #",
"value": "2743186",
"position": 1
},
{
"name": "Trailer Plate #",
"value": "T473278",
"position": 2
}
]
}
}
]
}
}
],
"pagination": {
"per_page": 25,
"page_no": 1,
"total": 1
}
}
{
"logs": [
{
"log": {
"id": 47,
"date": "2016-11-22",
"total_miles": 300,
"metric_units": false,
"driver_signed_at": "2016-07-16T00:05:21Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/log/driver_signature_upload/47/open-uri20160729-30633-1jeoj77?AWSAccessKeyId=AKIAJHHsdfsTJMZBMLQ&Expires=1485085850&Signature=YXqKF9nyfJI%2qEEq3obOLlFzsuKs0%3D",
"time_zone": "Pacific Time (US & Canada)",
"cycle": "70_8",
"driver_first_name": "Demo",
"driver_last_name": "Driver",
"carrier_name": "Demo Carrier",
"carrier_street": "415 Truckin St.",
"carrier_city": "San Francisco",
"carrier_state": "CA",
"carrier_zip": "94105",
"terminal_street": null,
"terminal_city": null,
"terminal_state": null,
"terminal_zip": null,
"notes": null,
"driver_company_id": null,
"origin": null,
"destination": null,
"exception_24_hour_restart": false,
"exception_8_hour_break": false,
"exception_wait_time": false,
"exception_short_haul": false,
"short_haul": false,
"eld_mode": "logs",
"co_driver_full_names": [
],
"odometers": {
},
"trailer_numbers": "17",
"vehicle_numbers": "12345, 12",
"off_duty_duration": 43200,
"on_duty_duration": 7200,
"sleeper_duration": 0,
"driving_duration": 21600,
"waiting_duration": 0,
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": null,
"status": "active",
"role": "driver"
},
"vehicles": [
{
"vehicle": {
"id": 11,
"number": "12345",
"year": null,
"make": null,
"model": null,
"vin": null,
"metric_units": true
}
}
],
"co_drivers": [
{
"co_driver": {
"id": 33,
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"email": "[email protected]",
"driver_company_id": null,
"status": "active",
"role": "driver"
}
}
],
"remarks": [
{
"remark": {
"id": 1,
"time": "2016-10-16T23:59:59Z",
"notes": null,
"location": null
}
}
],
"cycle_restarts": [
{
"cycle_restart": {
"id": 1,
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T05:00:00Z",
"type": "34_hour",
"name": "34 Hour"
}
}
],
"shipping_docs": "123ABC",
"form_and_manner_errors": [
],
"hos_violations": [
{
"hos_violation": {
"id": 12,
"type": "canada_driving_13",
"name": "13 Hour Driving Limit",
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T07:00:00Z"
}
}
],
"events": [
{
"event": {
"id": 221,
"type": "driving",
"notes": null,
"location": "Mobile, AL",
"start_time": "2016-10-16T07:00:00Z",
"end_time": "2016-10-16T09:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 474,
"type": "sleeper",
"notes": null,
"location": null,
"start_time": "2016-10-16T09:00:00Z",
"end_time": "2016-10-16T11:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 475,
"type": "driving",
"notes": null,
"location": null,
"start_time": "2016-10-16T11:00:00Z",
"end_time": "2016-10-17T07:00:00Z",
"is_manual": false
}
}
],
"inspection_reports": [
{
"inspection_report": {
"id": 9,
"log_id": 47,
"date": "2016-07-22",
"time": "2016-07-22T14:00:00Z",
"odometer": 253,
"inspection_duration": 300,
"carrier_name": "Demo Carrier",
"location": "Omaha, NE",
"status": "resolved",
"mechanic_signed_at": null,
"mechanic_signature_url": null,
"driver_signed_at": "2016-07-22T14:00:00Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/driver_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"reviewer_signed_at": "2016-07-22T14:00:00Z",
"reviewer_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/reviewer_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"entity_num": "entity_num",
"entity_type": "vehicle",
"is_rejected": false,
"inspection_type": "pre-trip",
"declaration": "I declare that this vehicle has been inspected in accordance with the applicable requirements.",
"inspected_parts": [
{
"id": 5,
"category": "Brakes",
"notes": "notes",
"type": "major",
"picture_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/defect/picture_upload/23137/15c31555-6642-4215-a3cd-81def1d329012396939324379336808.jpg?X",
"status": "[open]/[repaired]/[no_repair_needed]/[good]",
"mechanic_details": {
"resolver": {
"id": 1005,
"first_name": "Joshua",
"last_name": "Lee",
"username": "Joshua Lee",
"email": "[email protected]",
"driver_company_id": "123",
"status": "active",
"role": "driver"
},
"external_resolver_id": "111",
"mechanic_name": "Joshua Lee",
"mechanic_signed_at": "2016-07-22T14:00:00Z",
"mechanic_note": "this is resolved person note, could be anything",
"mechanic_signature": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/mechanic_signature_upload/9/open-uri20160712-30633-thc30n?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D"
}
}
],
"not_inspected_parts": [
{
"category": "9 - Emergency Equipment & Safety Devices"
},
{
"category": "15 - Heater/Defroster"
}
],
"vehicle": {
"id": 4,
"number": "Demo Vehicle",
"year": "2016",
"make": "Demo",
"model": "Vehicle",
"vin": "WP0AB2966NS458669",
"metric_units": false
},
"asset": {
"id": 101,
"make": "Toyota",
"metric_units": true,
"model": "Camry",
"name": "V123",
"year": 2022
},
"mechanic": {
"id": 12,
"first_name": "Joe",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"reviewer": {
"id": 13,
"first_name": "John",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"external_ids": [
{
"external_id": "201",
"integration_name": "generic_tms"
},
{
"external_id": "Truck123",
"integration_name": "generic_maintenance_system"
}
],
"entries": [
{
"name": "Tractor Plate #",
"value": "2743186",
"position": 1
},
{
"name": "Trailer Plate #",
"value": "T473278",
"position": 2
}
]
}
}
]
}
}
],
"pagination": {
"per_page": 25,
"page_no": 1,
"total": 1
}
}
{
"logs": [
{
"log": {
"id": 47,
"date": "2016-11-22",
"total_miles": 300,
"metric_units": false,
"driver_signed_at": "2016-07-16T00:05:21Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/log/driver_signature_upload/47/open-uri20160729-30633-1jeoj77?AWSAccessKeyId=AKIAJHHsdfsTJMZBMLQ&Expires=1485085850&Signature=YXqKF9nyfJI%2qEEq3obOLlFzsuKs0%3D",
"time_zone": "Pacific Time (US & Canada)",
"cycle": "70_8",
"driver_first_name": "Demo",
"driver_last_name": "Driver",
"carrier_name": "Demo Carrier",
"carrier_street": "415 Truckin St.",
"carrier_city": "San Francisco",
"carrier_state": "CA",
"carrier_zip": "94105",
"terminal_street": null,
"terminal_city": null,
"terminal_state": null,
"terminal_zip": null,
"notes": null,
"driver_company_id": null,
"origin": null,
"destination": null,
"exception_24_hour_restart": false,
"exception_8_hour_break": false,
"exception_wait_time": false,
"exception_short_haul": false,
"short_haul": false,
"eld_mode": "logs",
"co_driver_full_names": [
],
"odometers": {
},
"trailer_numbers": "17",
"vehicle_numbers": "12345, 12",
"off_duty_duration": 43200,
"on_duty_duration": 7200,
"sleeper_duration": 0,
"driving_duration": 21600,
"waiting_duration": 0,
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": null,
"status": "active",
"role": "driver"
},
"vehicles": [
{
"vehicle": {
"id": 11,
"number": "12345",
"year": null,
"make": null,
"model": null,
"vin": null,
"metric_units": true
}
}
],
"co_drivers": [
{
"co_driver": {
"id": 33,
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"email": "[email protected]",
"driver_company_id": null,
"status": "active",
"role": "driver"
}
}
],
"remarks": [
{
"remark": {
"id": 1,
"time": "2016-10-16T23:59:59Z",
"notes": null,
"location": null
}
}
],
"cycle_restarts": [
{
"cycle_restart": {
"id": 1,
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T05:00:00Z",
"type": "34_hour",
"name": "34 Hour"
}
}
],
"shipping_docs": "123ABC",
"form_and_manner_errors": [
],
"hos_violations": [
{
"hos_violation": {
"id": 12,
"type": "canada_driving_13",
"name": "13 Hour Driving Limit",
"start_time": "2016-10-16T08:00:00Z",
"end_time": "2016-10-17T07:00:00Z"
}
}
],
"events": [
{
"event": {
"id": 221,
"type": "driving",
"notes": null,
"location": "Mobile, AL",
"start_time": "2016-10-16T07:00:00Z",
"end_time": "2016-10-16T09:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 474,
"type": "sleeper",
"notes": null,
"location": null,
"start_time": "2016-10-16T09:00:00Z",
"end_time": "2016-10-16T11:00:00Z",
"is_manual": false
}
},
{
"event": {
"id": 475,
"type": "driving",
"notes": null,
"location": null,
"start_time": "2016-10-16T11:00:00Z",
"end_time": "2016-10-17T07:00:00Z",
"is_manual": false
}
}
],
"inspection_reports": [
{
"inspection_report": {
"id": 9,
"log_id": 47,
"date": "2016-07-22",
"time": "2016-07-22T14:00:00Z",
"odometer": 253,
"inspection_duration": 300,
"carrier_name": "Demo Carrier",
"location": "Omaha, NE",
"status": "resolved",
"mechanic_signed_at": null,
"mechanic_signature_url": null,
"driver_signed_at": "2016-07-22T14:00:00Z",
"driver_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/driver_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"reviewer_signed_at": "2016-07-22T14:00:00Z",
"reviewer_signature_url": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/reviewer_signature_upload/9/open-uri20160729-30645-1jeoj77?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D",
"entity_num": "entity_num",
"entity_type": "vehicle",
"is_rejected": false,
"inspection_type": "pre-trip",
"declaration": "I declare that this vehicle has been inspected in accordance with the applicable requirements.",
"inspected_parts": [
{
"id": 5,
"category": "Brakes",
"notes": "notes",
"type": "major",
"picture_url": "https://keep-truckin-preview.s3.amazonaws.com/uploads/defect/picture_upload/23137/15c31555-6642-4215-a3cd-81def1d329012396939324379336808.jpg?X",
"status": "[open]/[repaired]/[no_repair_needed]/[good]",
"mechanic_details": {
"resolver": {
"id": 1005,
"first_name": "Joshua",
"last_name": "Lee",
"username": "Joshua Lee",
"email": "[email protected]",
"driver_company_id": "123",
"status": "active",
"role": "driver"
},
"external_resolver_id": "111",
"mechanic_name": "Joshua Lee",
"mechanic_signed_at": "2016-07-22T14:00:00Z",
"mechanic_note": "this is resolved person note, could be anything",
"mechanic_signature": "https://keep-truckin-development.s3.amazonaws.com/uploads/inspection_report/mechanic_signature_upload/9/open-uri20160712-30633-thc30n?AWSAccessKeyId=AKIAJH12345&Expires=1481274629&Signature=Qi1mXnl0ylJ5tCuds789Ocq44L4%3D"
},
"defects": [
{
"title": "Air pressure gauge failure",
"severity": "major"
},
{
"title": "Slow air pressure build up rate",
"severity": "major"
},
{
"title": "Air loss rate exceeds prescribed limit",
"severity": "minor"
}
]
}
],
"not_inspected_parts": [
{
"category": "9 - Emergency Equipment & Safety Devices"
},
{
"category": "15 - Heater/Defroster"
}
],
"vehicle": {
"id": 4,
"number": "Demo Vehicle",
"year": "2016",
"make": "Demo",
"model": "Vehicle",
"vin": "WP0AB2966NS458669",
"metric_units": false
},
"asset": {
"id": 101,
"make": "Toyota",
"metric_units": true,
"model": "Camry",
"name": "V123",
"year": 2022
},
"mechanic": {
"id": 12,
"first_name": "Joe",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"driver": {
"id": 11,
"first_name": "Demo",
"last_name": "Driver",
"username": "demo_driver",
"email": null,
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"reviewer": {
"id": 13,
"first_name": "John",
"last_name": "Williams",
"username": null,
"email": "[email protected]",
"driver_company_id": "123",
"mcleod_id": null,
"status": "active",
"role": "driver"
},
"external_ids": [
{
"external_id": "201",
"integration_name": "generic_tms"
},
{
"external_id": "Truck123",
"integration_name": "generic_maintenance_system"
}
],
"entries": [
{
"name": "Tractor Plate #",
"value": "2743186",
"position": 1
},
{
"name": "Trailer Plate #",
"value": "T473278",
"position": 2
}
]
}
}
]
}
}
],
"pagination": {
"per_page": 25,
"page_no": 1,
"total": 1
}
}