Dashboard Overview
Retrieve the main dashboard overview data.
Endpoint
INFO
GET /api/v1/dashboard
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Example Request
bash
curl -X GET https://api.daakey.com/api/v1/dashboard \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Dashboard overview retrieved",
"data": {
"summary": {
"total_vehicles": 50,
"available_vehicles": 35,
"active_bookings": 12,
"total_clients": 500,
"revenue_this_month": 25000.00,
"currency": "USD"
},
"today": {
"bookings_starting": 5,
"bookings_ending": 3,
"new_clients": 2
},
"vehicles_by_status": {
"available": 35,
"booked": 8,
"in_use": 4,
"maintenance": 3
},
"recent_bookings": [
{
"id": 100,
"reference": "BK-2024-00100",
"client_name": "John Doe",
"vehicle": "Toyota Corolla (ABC-123)",
"status": "active",
"start_date": "2024-01-15T10:00:00Z"
}
],
"alerts": [
{
"type": "maintenance",
"message": "3 vehicles due for maintenance",
"count": 3
},
{
"type": "documents",
"message": "5 client documents pending verification",
"count": 5
}
]
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Data is scoped based on user's role and permissions
- Super admins see system-wide data
- Partner admins see data for all their agencies
- Agency users see only their agency's data