Dashboard API Overview
The Dashboard API powers the Daakey administrative dashboard, providing comprehensive endpoints for managing all aspects of a car sharing business. This API is used by agency staff, partner administrators, and platform super admins to manage fleets, monitor bookings, handle customer support, and analyze business performance.
Unlike the Client API (which requires agency signatures), the Dashboard API uses role-based access control (RBAC) to determine what each user can access. Users are scoped to their organizational level—super admins see everything, while agency staff only see their own agency's data.
Base URL
https://api.daakey.com/api/v1/dashboardAuthentication
All Dashboard API requests require a Bearer token obtained via login.
Authorization: Bearer {token}See Authentication for details.
User Roles
| Role | Description |
|---|---|
super_admin | Full system access |
partner_admin | Partner-level management |
agency_admin | Agency-level management |
agency_staff | Limited agency access |
Available Endpoints
Authentication
| Method | Endpoint | Description |
|---|---|---|
| POST | /login | Login |
| POST | /logout | Logout |
| POST | /refresh | Refresh token |
| GET | /me | Get current user |
Dashboard
| Method | Endpoint | Description |
|---|---|---|
| GET | / | Dashboard overview |
| GET | /stats | Statistics |
| GET | /recent-activity | Activity feed |
| POST | /check-availability | Check vehicle availability |
Profile
| Method | Endpoint | Description |
|---|---|---|
| GET | /profile | Get profile |
| PUT | /profile | Update profile |
| PUT | /profile/password | Change password |
Partners (Super Admin)
| Method | Endpoint | Description |
|---|---|---|
| GET | /partners | List partners |
| POST | /partners | Create partner |
| GET | /partners/{id} | Get partner |
| PUT | /partners/{id} | Update partner |
| DELETE | /partners/{id} | Delete partner |
| GET | /partners-stats | Partner statistics |
| GET | /partners/{id}/agencies | Partner agencies |
| PATCH | /partners/{id}/toggle-status | Toggle status |
Agencies (Super Admin, Partner)
| Method | Endpoint | Description |
|---|---|---|
| GET | /agencies | List agencies |
| POST | /agencies | Create agency |
| GET | /agencies/{id} | Get agency |
| PUT | /agencies/{id} | Update agency |
| DELETE | /agencies/{id} | Delete agency |
| GET | /agencies-stats | Agency statistics |
Stations
| Method | Endpoint | Description |
|---|---|---|
| GET | /stations | List stations |
| POST | /stations | Create station |
| GET | /stations/{id} | Get station |
| PUT | /stations/{id} | Update station |
| DELETE | /stations/{id} | Delete station |
| GET | /stations-stats | Station statistics |
| GET | /stations/{id}/vehicles | Station vehicles |
Vehicles
| Method | Endpoint | Description |
|---|---|---|
| GET | /vehicles | List vehicles |
| POST | /vehicles | Create vehicle |
| GET | /vehicles/{id} | Get vehicle |
| PUT | /vehicles/{id} | Update vehicle |
| DELETE | /vehicles/{id} | Delete vehicle |
| GET | /vehicles-stats | Vehicle statistics |
| GET | /vehicles-available | Available vehicles |
| POST | /vehicles/{id}/control/* | Vehicle control |
Vehicle Damages
| Method | Endpoint | Description |
|---|---|---|
| GET | /damages | List damages |
| POST | /damages | Create damage |
| GET | /damages/{id} | Get damage |
| PUT | /damages/{id} | Update damage |
| DELETE | /damages/{id} | Delete damage |
| GET | /damages-stats | Damage statistics |
| PUT | /damages/{id}/status | Update status |
| PUT | /damages/{id}/resolve | Resolve damage |
| POST | /damages/{id}/images | Add image |
| DELETE | /damages/{id}/images/{img} | Remove image |
Clients
| Method | Endpoint | Description |
|---|---|---|
| GET | /clients | List clients |
| GET | /clients/{id} | Get client |
| PUT | /clients/{id} | Update client |
| DELETE | /clients/{id} | Delete client |
| GET | /clients-stats | Client statistics |
| GET | /clients/{id}/bookings | Client bookings |
| GET | /clients/{id}/transactions | Client transactions |
Bookings
| Method | Endpoint | Description |
|---|---|---|
| GET | /bookings | List bookings |
| GET | /bookings/{id} | Get booking |
| PUT | /bookings/{id} | Update booking |
| DELETE | /bookings/{id} | Cancel booking |
| GET | /bookings-stats | Booking statistics |
Transactions
| Method | Endpoint | Description |
|---|---|---|
| GET | /transactions | List transactions |
| GET | /transactions/{id} | Get transaction |
| PUT | /transactions/{id} | Refund transaction |
| GET | /transactions-stats | Transaction statistics |
Announcements
| Method | Endpoint | Description |
|---|---|---|
| GET | /announcements | List announcements |
| POST | /announcements | Create announcement |
| GET | /announcements/{id} | Get announcement |
| PUT | /announcements/{id} | Update announcement |
| DELETE | /announcements/{id} | Delete announcement |
| GET | /announcements-stats | Announcement statistics |
Users (Super Admin)
| Method | Endpoint | Description |
|---|---|---|
| GET | /users | List users |
| POST | /users | Create user |
| GET | /users/{id} | Get user |
| PUT | /users/{id} | Update user |
| DELETE | /users/{id} | Delete user |
Support Tickets
| Method | Endpoint | Description |
|---|---|---|
| GET | /tickets | List tickets |
| POST | /tickets | Create ticket |
| GET | /tickets/{id} | Get ticket |
| PUT | /tickets/{id} | Update ticket |
| POST | /tickets/{id}/messages | Add message |
| PATCH | /tickets/{id}/status | Change status |
| PATCH | /tickets/{id}/close | Close ticket |
| GET | /tickets/stats | Ticket statistics |
History
| Method | Endpoint | Description |
|---|---|---|
| GET | /histories | List history |
Media
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload | Upload media |
Response Format
All responses follow the standard format:
{
"success": true,
"message": "Operation completed",
"data": { ... },
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Pagination
List endpoints support pagination:
GET /vehicles?page=1&per_page=20Response includes pagination metadata:
{
"meta": {
"current_page": 1,
"last_page": 5,
"per_page": 20,
"total": 100
}
}