Vehicles API
Complete reference for the Vehicles API endpoints, including vehicle management, status updates, and ride operations.
Base URL for all vehicle endpoints:
/api/vehicles/
Vehicle States
Available vehicle states in the system
DOCKED
Vehicle is docked at a depotEN_ROUTE_TO_PICKUP
Vehicle is heading to pickup locationAWAITING_PASSENGER
Vehicle is waiting for passengerIN_RIDE
Vehicle is currently in a rideRETURNING
Vehicle is returning to depotEndpoints
Available API endpoints for vehicle management
Method | Endpoint | Description |
---|---|---|
GET | /api/vehicles/ | List all vehicles |
POST | /api/vehicles/ | Create a new vehicle |
GET | /api/vehicles/{id}/ | Get vehicle details |
POST | /api/vehicles/{id}/request_ride/ | Request a ride from vehicle |
POST | /api/vehicles/{id}/complete_ride/ | Complete current ride |
POST | /api/vehicles/{id}/schedule_maintenance/ | Schedule vehicle maintenance |
Battery Management
Vehicles automatically monitor battery levels and request charging when below 20%.
- Battery level monitoring
- Automatic charging requests
- Charging status updates
- Low battery alerts
Maintenance
Schedule and track vehicle maintenance through the API.
- Maintenance scheduling
- Service history tracking
- Maintenance alerts
- Service status updates