get https://api.gomotive.com/v1/inspection_reports
Purpose: Use this API to fetch a inspection reports of your company's drivers. You can use the following filters:
- Driver IDs
- Vehicle IDs
- Start Date
- End Date
- Status
- Updated After
You may refer to the Query Parameters section for more info.
require 'uri'
require 'net/http'
url = URI('https://api.gomotive.com/v1/inspection_reports')
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
inspection_reports
- Type: Array of Objects
- Description: List of inspection reports.
inspection_report
- Type: Object
- Description: Details of an individual inspection report.
id
- Type: Integer
- Description: Unique identifier for the inspection report.
log_id
- Type: Integer
- Description: Identifier for the log associated with the inspection.
date
- Type: String (Date)
- Description: Date of the inspection report (e.g., "2016-07-22").
time
- Type: String (Date-Time)
- Description: Time of the inspection report (e.g., "2016-07-22T14:00:00Z").
odometer
- Type: Float or Null
- Description: Odometer reading at the time of the inspection (null if not available).
carrier_name
- Type: String
- Description: Name of the carrier (e.g., "Demo Carrier").
vehicle_number
- Type: String
- Description: Vehicle number (e.g., "Demo Vehicle").
trailer_nums
- Type: Array of Strings
- Description: List of trailer numbers (e.g., ["17"]).
location
- Type: String
- Description: Location of the inspection (e.g., "Omaha, NE").
city
- Type: String
- Description: City where the inspection occurred (e.g., "Omaha").
state
- Type: String
- Description: State where the inspection occurred (e.g., "NE").
status
- Type: String
- Description: Status of the inspection report (e.g., "corrected").
mechanic_signed_at
- Type: String (Date-Time)
- Description: Timestamp when the mechanic signed the report (e.g., "2016-07-22T14:00:00Z").
mechanic_signature_url
- Type: String
- Description: URL of the mechanic's signature image.
driver_signed_at
- Type: String (Date-Time)
- Description: Timestamp when the driver signed the report (e.g., "2016-07-22T14:00:00Z").
driver_signature_url
- Type: String
- Description: URL of the driver's signature image.
reviewer_signed_at
- Type: String (Date-Time)
- Description: Timestamp when the reviewer signed the report (e.g., "2016-07-22T14:00:00Z").
reviewer_signature_url
- Type: String
- Description: URL of the reviewer's signature image.
defects
- Type: Array of Objects
- Description: List of defects found during the inspection.
id
- Type: Integer
- Description: Unique identifier for the defect.
area
- Type: String
- Description: Area of the vehicle where the defect was found (e.g., "tractor").
category
- Type: String
- Description: Category of the defect (e.g., "Mirrors").
notes
- Type: String or Null
- Description: Additional notes about the defect (null if not applicable).
vehicle
- Type: Object
- Description: Information about the vehicle.
id
- Type: Integer
- Description: Unique identifier for the vehicle.
number
- Type: String
- Description: Vehicle number (e.g., "Demo Vehicle").
year
- Type: String
- Description: Vehicle year (e.g., "2016").
make
- Type: String
- Description: Vehicle make (e.g., "Demo").
model
- Type: String
- Description: Vehicle model (e.g., "Vehicle").
vin
- Type: String
- Description: Vehicle identification number (e.g., "WP0AB2966NS458669").
metric_units
- Type: Boolean
- Description: Whether the vehicle uses metric units (false if not).
mechanic
- Type: Object
- Description: Information about the mechanic who signed the report.
id
- Type: Integer
- Description: Unique identifier for the mechanic.
first_name
- Type: String
- Description: Mechanic's first name (e.g., "Joe").
last_name
- Type: String
- Description: Mechanic's last name (e.g., "Williams").
username
- Type: String or Null
- Description: Mechanic's username (null if not applicable).
email
- Type: String or Null
- Description: Mechanic's email address (e.g., "joe@example.com").
driver_company_id
- Type: String or Null
- Description: Mechanic's company ID (null if not applicable).
status
- Type: String
- Description: Mechanic's status (e.g., "active").
role
- Type: String
- Description: Mechanic's role (e.g., "admin").
driver
- Type: Object
- Description: Information about the driver who signed the report.
id
- Type: Integer
- Description: Unique identifier for the driver.
first_name
- Type: String
- Description: Driver's first name (e.g., "Demo").
last_name
- Type: String
- Description: Driver's last name (e.g., "Driver").
username
- Type: String
- Description: Driver's username (e.g., "demo_driver").
email
- Type: String or Null
- Description: Driver's email address (null if not applicable).
driver_company_id
- Type: String or Null
- Description: Driver's company ID (null if not applicable).
status
- Type: String
- Description: Driver's status (e.g., "active").
role
- Type: String
- Description: Driver's role (e.g., "driver").
reviewer
- Type: Object
- Description: Information about the reviewer of the report.
id
- Type: Integer
- Description: Unique identifier for the reviewer.
first_name
- Type: String
- Description: Reviewer's first name (e.g., "John").
last_name
- Type: String
- Description: Reviewer's last name (e.g., "Williams").
username
- Type: String or Null
- Description: Reviewer's username (null if not applicable).
email
- Type: String
- Description: Reviewer's email address (e.g., "john@example.com").
driver_company_id
- Type: String or Null
- Description: Reviewer's company ID (null if not applicable).
status
- Type: String
- Description: Reviewer's status (e.g., "active").
role
- Type: String
- Description: Reviewer's role (e.g., "driver").
external_ids
- Type: Array of Objects
- Description: List of external IDs associated with the inspection report.
external_id
- Type: String
- Description: External ID (e.g., "201").
integration_name
- Type: String
- Description: Integration name associated with the external ID (e.g., "generic_tms").
entries
- Type: Array of Objects
- Description: List of entries related to the inspection report.
name
- Type: String
- Description: Name of the entry (e.g., "Tractor Plate #").
value
- Type: String
- Description: Value of the entry (e.g., "2743186").
position
- Type: Integer
- Description: Position of the entry in the list.
per_page
- Type: Integer
- Description: Number of records per page (e.g., 25).
page_no
- Type: Integer
- Description: Current page number (e.g., 1).
total
- Type: Integer
- Description: Total number of records (e.g., 3).