Skip to main content
GET
/
v1
/
vehicles
/
{vehicleId}
/
trips
/
active
curl "https://api.bookovia.com/v1/vehicles/16128b9d-5356-48a8-b9e0-be1a9b904c6f/trips/active" \
  -H "X-API-Key: bkv_test_your_api_key"
{
  "success": true,
  "data": {
    "trips": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "org_id": "org_123456",
        "vehicle_id": "16128b9d-5356-48a8-b9e0-be1a9b904c6f",
        "user_id": "86927352-9739-4317-980c-59dfbb6059eb",
        "status": "recording",
        "purpose": "business",
        "start_time": "2026-04-17T10:30:00Z",
        "duration_seconds": 3600,
        "distance_meters": 42700,
        "created_at": "2026-04-17T10:30:00Z"
      }
    ],
    "count": 1
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.bookovia.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Fetches all active (recording or paused) trips for a specific vehicle. Returns trips with status recording or paused, ordered by start time (newest first).

Path Parameters

vehicleId
string
required
The unique identifier for the vehicle whose active trips you want to retrieve

Headers

X-API-Key
string
required
Your API key for authentication starting with bkv_

Response

success
boolean
Indicates if the request was successful
data
object
Response data object
curl "https://api.bookovia.com/v1/vehicles/16128b9d-5356-48a8-b9e0-be1a9b904c6f/trips/active" \
  -H "X-API-Key: bkv_test_your_api_key"
{
  "success": true,
  "data": {
    "trips": [
      {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "org_id": "org_123456",
        "vehicle_id": "16128b9d-5356-48a8-b9e0-be1a9b904c6f",
        "user_id": "86927352-9739-4317-980c-59dfbb6059eb",
        "status": "recording",
        "purpose": "business",
        "start_time": "2026-04-17T10:30:00Z",
        "duration_seconds": 3600,
        "distance_meters": 42700,
        "created_at": "2026-04-17T10:30:00Z"
      }
    ],
    "count": 1
  }
}

Use Cases

  • Vehicle Status Monitoring: Check if a vehicle is currently in use
  • Fleet Management: Track which vehicles are actively being driven
  • Prevent Duplicate Trips: Ensure a vehicle doesn’t have multiple active trips
  • Vehicle Utilization: Monitor real-time vehicle usage

Important Notes

  • Returns trips with status recording or paused
  • A vehicle should typically have only 0 or 1 active trip
  • Results are ordered by start_time DESC (newest first)
  • Empty array returned if vehicle has no active trips
  • Requires valid API key with bkv_ prefix

Error Responses

401 Unauthorized
{
  "success": false,
  "error": "API key required"
}
401 Invalid API Key
{
  "success": false,
  "error": "Invalid API key format"
}
500 Server Error
{
  "success": false,
  "error": "Failed to fetch active trips"
}