Comprehensive API Reference for Drivers, Admins, and Trips
Purpose: Lightweight API endpoint providing essential driver information only. Optimized for performance and minimal data transfer. Ideal for quick lookups and mobile applications where bandwidth is a concern.
{
"success": true,
"version": "v1",
"count": 1,
"data": [
{
"id": 1,
"user_id": 5,
"area_id": 2,
"license_number": "DL123456",
"driver_status": "approved",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+1234567890",
"profile_image": "profile.jpg",
"area_name": "Downtown",
"area_code": "DT",
"card_id_number": "CARD001",
"card_type": "driver",
"card_status": "active",
"routes": [
{
"id": 1,
"area_id": 2,
"from_location": "Station A",
"to_location": "Station B",
"location": "Main Street",
"distance_km": 5.2,
"estimated_duration_minutes": 15,
"fare_amount": 15.00,
"status": "active"
}
]
}
]
}
Purpose: Moderate detail API endpoint with comprehensive user information and management capabilities. Includes full CRUD operations for driver management, status updates, and search functionality.
{
"success": true,
"version": "v2",
"count": 1,
"data": [
{
"driver_id": 1,
"user_id": 5,
"area_id": 2,
"address_line1": "123 Main St",
"city": "City",
"province": "Province",
"license_number": "DL123456",
"license_expiry_date": "2025-12-31",
"license_type": "Professional",
"driver_status": "approved",
"background_check_status": "passed",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+1234567890",
"date_of_birth": "1990-01-01",
"gender": "Male",
"profile_image": "profile.jpg",
"user_status": "active",
"area_name": "Downtown",
"area_code": "DT",
"card_id_number": "CARD001",
"card_type": "driver",
"card_status": "active",
"card_balance": 500.00,
"routes": [
{
"id": 1,
"area_id": 2,
"from_location": "Station A",
"to_location": "Station B",
"distance_km": 5.2,
"estimated_duration_minutes": 15,
"fare_amount": 15.00,
"status": "active"
}
]
}
]
}
Purpose: Full-featured API endpoint with all fields, relationships, and advanced operations. Designed for comprehensive data access, complex operations, bulk updates, and detailed analytics. Includes optional trip data inclusion.
{
"success": true,
"version": "v3",
"count": 1,
"total": 50,
"limit": 1000,
"offset": 0,
"data": [
{
"driver_id": 1,
"user_id": 5,
"area_id": 2,
"address_line1": "123 Main St",
"address_line2": "Apt 4B",
"city": "City",
"province": "Province",
"postal_code": "12345",
"license_number": "DL123456",
"license_expiry_date": "2025-12-31",
"license_type": "Professional",
"license_image": "license_front.jpg",
"license_back_image": "license_back.jpg",
"driver_status": "approved",
"background_check_status": "passed",
"background_check_document": "bg_check.pdf",
"approved_at": "2024-01-15 10:30:00",
"area_id_full": 2,
"area_name": "Downtown",
"area_code": "DT",
"area_description": "Downtown area routes",
"area_status": "active",
"routes": [
{
"id": 1,
"area_id": 2,
"from_location": "Station A",
"to_location": "Station B",
"location": "Main Street",
"distance_km": 5.2,
"estimated_duration_minutes": 15,
"fare_amount": 15.00,
"status": "active",
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-01 00:00:00"
}
],
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"middle_name": "M",
"phone_number": "+1234567890",
"date_of_birth": "1990-01-01",
"gender": "Male",
"profile_image": "profile.jpg",
"user_status": "active",
"is_verified": true,
"email_verified": true,
"card_id": 10,
"card_id_number": "CARD001",
"card_type": "driver",
"card_status": "active",
"card_balance": 500.00
}
],
"metadata": {
"generated_at": "2024-01-15 12:00:00",
"api_version": "v3.0.0",
"includes_trips": false
}
}