Fetch a compliance driving event by ID

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

Purpose: Use this API to fetch a single compliance driving event by its unique ID.

📘

IMPORTANT NOTES

  • Both id and start_time are required to uniquely locate the event because the underlying table is partitioned by time.
  • Use the start_time value returned for the event by the list endpoint.
  • 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_event

  • Type: Object
  • Description: Contains the details of the compliance driving event.

compliance_driving_event.id

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

compliance_driving_event.start_time

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

compliance_driving_event.end_time

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

compliance_driving_event.status

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

compliance_driving_event.type

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

compliance_driving_event.duration

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

compliance_driving_event.start_kilometers

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

compliance_driving_event.end_kilometers

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

compliance_driving_event.notes

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

compliance_driving_event.distance_km

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

compliance_driving_event.annotation_status

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

compliance_driving_event.origin

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

compliance_driving_event.origin_lat

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

compliance_driving_event.origin_lon

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

compliance_driving_event.destination

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

compliance_driving_event.destination_lat

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

compliance_driving_event.destination_lon

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

compliance_driving_event.created_at

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

compliance_driving_event.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.

Path Params
string
required

Specify the ID of the compliance driving event to view its details.

Query Params
date

The timestamp of the driving event as returned by the "Fetch a list of the compliance driving events" endpoint.

Responses

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