Trips

This endpoint provides detailed breadcrumb locations of historical trips, allowing fleet managers to track where vehicles have been at specific times. Use this data to validate routes, analyze trip performance, or generate reports.


What Are Breadcrumb Locations?

Breadcrumb locations are sequential GPS points captured during a vehicle's trip. Each point logs details such as:

  • Coordinates: Latitude and longitude showing the vehicle’s exact location.
  • Timestamp: Time when the location was recorded.
  • Event Type (Optional): Specific trip-related event detected (e.g., stops, harsh braking).
  • Speed (Optional): The speed of the vehicle at the recorded point.

Fleet managers can leverage this data to:

  • Validate Routes: Confirm vehicles followed planned paths.
  • Analyze Performance: Spot inefficiencies or delays in operations.
  • Generate Reports: Create maps or summaries for audits or client presentations.

Endpoint:

GET /trips/breadcrumbs


Description:

Retrieve all historical breadcrumb locations within a defined time range. Each entry includes GPS coordinates, timestamp, and additional metadata (e.g., speed, events) to provide deeper insights into trip performance.


Query Parameters

ParameterTypeDescription
fromdate-timeStart time in RFC 3339 format (e.g., 2024-10-01T00:00:00Z).
todate-timeEnd time in RFC 3339 format (e.g., 2024-10-10T23:59:59Z).
vehicleIdsArray(Optional) Filter breadcrumbs by specific vehicle IDs.
driverIdsArray(Optional) Filter breadcrumbs by specific driver IDs.
includeEventsBoolean(Optional) Whether to include trip-related events in the response.

Headers

HeaderTypeDescription
x-api-keyStringRequired API key for authentication.
Connection-IdUUIDIdentifies the specific connection.

Example Request (cURL)

curl --request GET \
--url "https://api.analytics.autos/trips/breadcrumbs?from=2024-10-01T00:00:00Z&to=2024-10-10T23:59:59Z&vehicleIds=1234&includeEvents=true" \
--header "x-api-key: YOUR-API-KEY" \
--header "Connection-Id: YOUR-CONNECTION-ID"

Response Example

{
  "status": 200,
  "message": "Success",
  "data": [
    {
      "latitude": 33.6844,
      "longitude": 73.0479,
      "speed": 60,
      "eventType": "Harsh Braking",
      "time": "2024-10-13T16:03:30.557Z"
    },
    {
      "latitude": 33.6845,
      "longitude": 73.0480,
      "speed": 62,
      "eventType": "Normal Driving",
      "time": "2024-10-13T16:04:00.557Z"
    }
  ]
}

Response Fields Explained

  • latitude: Latitude coordinate of the vehicle's position.
  • longitude: Longitude coordinate of the vehicle's position.
  • speed: Speed of the vehicle (in km/h or mph, depending on account configuration).
  • eventType: Optional metadata indicating trip-related events (e.g., "Harsh Braking", "Normal Driving").
  • time: Timestamp of when the position was logged in RFC 3339 format.