API Gateway Documentation

Comprehensive API Reference for Drivers, Admins, and Trips

Drivers API

Version 1.0

Basic Driver Information

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.

Use Cases:

  • Public driver listings and directories
  • Mobile applications requiring fast response times
  • Quick driver lookups and search functionality
  • Low bandwidth scenarios and offline-first applications
  • Simple driver information display
GET POST
http://gateway.ejeepdev.site/api/v1/drivers.php
Returns: Driver ID, user ID, name, phone number, license number, driver status, profile image, card ID number, card type, card status, area information, and routes array.
{ "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" } ] } ] }
Version 2.0

Standard Driver Information

Purpose: Moderate detail API endpoint with comprehensive user information and management capabilities. Includes full CRUD operations for driver management, status updates, and search functionality.

Use Cases:

  • Admin dashboards and management interfaces
  • Driver management systems and workflows
  • Reporting and analytics platforms
  • Driver status updates and modifications
  • Moderate data requirements with user details
GET POST PUT DELETE
http://gateway.ejeepdev.site/api/v2/drivers.php
Returns: Complete address information, license details (number, expiry, type), driver status, background check status, user information (email, name, phone, date of birth, gender), card information with balance, assignment timestamps, area information, and routes array.
{ "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" } ] } ] }
Version 3.0

Complete Driver Information

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.

Use Cases:

  • Internal systems and enterprise applications
  • Full data exports and data migration
  • Comprehensive analytics and business intelligence
  • Auditing, compliance, and regulatory reporting
  • Bulk operations and batch processing
  • Statistics generation and advanced reporting
GET POST PUT PATCH DELETE
http://gateway.ejeepdev.site/api/v3/drivers.php
Returns: All driver fields including license images, background check documents, complete user profile, full card details with assignment history, area information with routes array, optional trip data, pagination metadata, and comprehensive statistics.
{ "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 } }