Fetch a list of the compliance driving events

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Purpose: Use this API to fetch a paginated list of compliance driving events for the authenticated company. Compliance driving events include regular driving, Personal Conveyance (PC), and Yard Move (YM) events.

📘

IMPORTANT NOTES

  • The date range between start_date and end_date cannot exceed 30 days.
  • start_date cannot be older than 2 years unless older-data access is enabled for the company.
  • Use -1 in driver_ids to filter for events without an assigned driver.
  • The endpoint is available only when the compliance-public-api-compliance-driving-events-enabled feature flag is enabled for the company.
  • Results are scoped to the authenticated company. For group-scoped API keys, results are also limited to the groups assigned to the key.
  • mcleod_id is returned only when the company has McLeod integration enabled.

Response Parameters

compliance_driving_events

  • Type: Array of Objects
  • Description: List of compliance driving events.

compliance_driving_events.id

  • Type: Integer
  • Description: Unique identifier for the driving event.

compliance_driving_events.start_time

  • Type: String (Date-Time)
  • Description: ISO 8601 timestamp when the event started.

compliance_driving_events.end_time

  • Type: String (Date-Time)
  • Description: ISO 8601 timestamp when the event ended.

compliance_driving_events.status

  • Type: String
  • Description: Current status of the event (e.g., complete).

compliance_driving_events.type

  • Type: String
  • Description: Type of event recorded (e.g., driving).

compliance_driving_events.duration

  • Type: Integer
  • Description: Duration of the event in seconds.

compliance_driving_events.start_kilometers

  • Type: Number (Float)
  • Description: Odometer reading at the start of the event in kilometers.

compliance_driving_events.end_kilometers

  • Type: Number (Float)
  • Description: Odometer reading at the end of the event in kilometers.

compliance_driving_events.notes

  • Type: String / Null
  • Description: Additional notes associated with the event.

compliance_driving_events.distance_km

  • Type: Number (Float)
  • Description: Total distance traveled during the event in kilometers.

compliance_driving_events.annotation_status

  • Type: String
  • Description: Annotation status of the event (e.g., not_annotated).

compliance_driving_events.origin

  • Type: String
  • Description: Starting address or location description.

compliance_driving_events.origin_lat

  • Type: Number (Float)
  • Description: Latitude coordinate of the origin location.

compliance_driving_events.origin_lon

  • Type: Number (Float)
  • Description: Longitude coordinate of the origin location.

compliance_driving_events.destination

  • Type: String
  • Description: Ending address or location description.

compliance_driving_events.destination_lat

  • Type: Number (Float)
  • Description: Latitude coordinate of the destination location.

compliance_driving_events.destination_lon

  • Type: Number (Float)
  • Description: Longitude coordinate of the destination location.

compliance_driving_events.created_at

  • Type: String (Date-Time)
  • Description: ISO 8601 timestamp when the record was created.

compliance_driving_events.updated_at

  • Type: String (Date-Time)
  • Description: ISO 8601 timestamp when the record was last updated.

driver

  • Type: Object
  • Description: Details of the driver associated with the event.

driver.id

  • Type: Integer
  • Description: Unique identifier for the driver.

driver.first_name

  • Type: String
  • Description: First name of the driver.

driver.last_name

  • Type: String
  • Description: Last name of the driver.

driver.username

  • Type: String
  • Description: Username of the driver.

driver.email

  • Type: String
  • Description: Email address of the driver.

driver.driver_company_id

  • Type: String
  • Description: Company-assigned identifier for the driver.

driver.status

  • Type: String
  • Description: Current status of the driver (e.g., active).

driver.role

  • Type: String
  • Description: Role of the user in the organization (e.g., driver).

vehicle

  • Type: Object
  • Description: Details of the vehicle used during the event.

vehicle.id

  • Type: Integer
  • Description: Unique identifier for the vehicle.

vehicle.number

  • Type: String
  • Description: Vehicle unit or fleet number.

vehicle.year

  • Type: Integer
  • Description: Manufacturing year of the vehicle.

vehicle.make

  • Type: String
  • Description: Manufacturer or make of the vehicle.

vehicle.model

  • Type: String
  • Description: Model name of the vehicle.

vehicle.vin

  • Type: String
  • Description: Vehicle Identification Number (VIN).

vehicle.metric_units

  • Type: Boolean
  • Description: Denotes if the vehicle uses metric units.

pagination

  • Type: Object
  • Description: Details regarding the paginated response.

pagination.per_page

  • Type: Integer
  • Description: Number of records returned per page.

pagination.page_no

  • Type: Integer
  • Description: Current page number of the result set.

pagination.total

  • Type: Integer
  • Description: Total count of matching records across all pages.

Query Params
driver_ids
array of int32s
Defaults to

Specify the ID of the driver or drivers for whom you want to fetch the compliance driving events. Use -1 for an unassigned driver. Default: [].

driver_ids
vehicle_ids
array of int32s
Defaults to

Specify the ID of vehicle or vehicles for which you want to fetch the compliance driving events. Default: [].

vehicle_ids
string

Specify the status of the compliance driving event. Allowed values are: interrupted, in_progress, complete.

string

Specify the type of the event. Allowed values are pc, ym, driving.

annotation_status
array of strings
Defaults to []

Specify the annotation status to filter the results accordingly. Accepted values: not_annotated, annotated, pending_annotation, pending_assignment_with_annotation. Default: [].

annotation_status
date

Start of the date range to query. Default: one week ago.

date

End of the date range to query. Default: today.

date

Returns only events updated after this timestamp.

int32

Number of results per page. Default: 25. Maximum: 100.

int32

Page number to fetch. Default: 1.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json