Station Vehicles
Retrieve all vehicles at a specific station.
Endpoint
INFO
GET /api/v1/dashboard/stations/{station}/vehicles
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
station | integer | Station ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter: available, booked, in_use, maintenance |
category | string | - | Filter by vehicle category |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/stations/1/vehicles?status=available" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Station vehicles retrieved",
"data": [
{
"id": 1,
"plate_number": "ABC-123",
"brand": "Toyota",
"model": "Corolla",
"year": 2023,
"category": "sedan",
"status": "available",
"fuel_level": 85,
"mileage": 15420,
"pricing": {
"hourly_rate": 15.00,
"daily_rate": 80.00
}
},
{
"id": 2,
"plate_number": "XYZ-789",
"brand": "Honda",
"model": "CR-V",
"year": 2022,
"category": "suv",
"status": "available",
"fuel_level": 60,
"mileage": 28500,
"pricing": {
"hourly_rate": 20.00,
"daily_rate": 110.00
}
}
],
"meta": {
"station": {
"id": 1,
"name": "Downtown Station"
},
"total": 2,
"by_status": {
"available": 2,
"booked": 3,
"in_use": 2,
"maintenance": 1
}
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}