Skip to content

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/dashboard

Authentication

All Dashboard API requests require a Bearer token obtained via login.

Authorization: Bearer {token}

See Authentication for details.

User Roles

RoleDescription
super_adminFull system access
partner_adminPartner-level management
agency_adminAgency-level management
agency_staffLimited agency access

Available Endpoints

Authentication

MethodEndpointDescription
POST/loginLogin
POST/logoutLogout
POST/refreshRefresh token
GET/meGet current user

Dashboard

MethodEndpointDescription
GET/Dashboard overview
GET/statsStatistics
GET/recent-activityActivity feed
POST/check-availabilityCheck vehicle availability

Profile

MethodEndpointDescription
GET/profileGet profile
PUT/profileUpdate profile
PUT/profile/passwordChange password

Partners (Super Admin)

MethodEndpointDescription
GET/partnersList partners
POST/partnersCreate partner
GET/partners/{id}Get partner
PUT/partners/{id}Update partner
DELETE/partners/{id}Delete partner
GET/partners-statsPartner statistics
GET/partners/{id}/agenciesPartner agencies
PATCH/partners/{id}/toggle-statusToggle status

Agencies (Super Admin, Partner)

MethodEndpointDescription
GET/agenciesList agencies
POST/agenciesCreate agency
GET/agencies/{id}Get agency
PUT/agencies/{id}Update agency
DELETE/agencies/{id}Delete agency
GET/agencies-statsAgency statistics

Stations

MethodEndpointDescription
GET/stationsList stations
POST/stationsCreate station
GET/stations/{id}Get station
PUT/stations/{id}Update station
DELETE/stations/{id}Delete station
GET/stations-statsStation statistics
GET/stations/{id}/vehiclesStation vehicles

Vehicles

MethodEndpointDescription
GET/vehiclesList vehicles
POST/vehiclesCreate vehicle
GET/vehicles/{id}Get vehicle
PUT/vehicles/{id}Update vehicle
DELETE/vehicles/{id}Delete vehicle
GET/vehicles-statsVehicle statistics
GET/vehicles-availableAvailable vehicles
POST/vehicles/{id}/control/*Vehicle control

Vehicle Damages

MethodEndpointDescription
GET/damagesList damages
POST/damagesCreate damage
GET/damages/{id}Get damage
PUT/damages/{id}Update damage
DELETE/damages/{id}Delete damage
GET/damages-statsDamage statistics
PUT/damages/{id}/statusUpdate status
PUT/damages/{id}/resolveResolve damage
POST/damages/{id}/imagesAdd image
DELETE/damages/{id}/images/{img}Remove image

Clients

MethodEndpointDescription
GET/clientsList clients
GET/clients/{id}Get client
PUT/clients/{id}Update client
DELETE/clients/{id}Delete client
GET/clients-statsClient statistics
GET/clients/{id}/bookingsClient bookings
GET/clients/{id}/transactionsClient transactions

Bookings

MethodEndpointDescription
GET/bookingsList bookings
GET/bookings/{id}Get booking
PUT/bookings/{id}Update booking
DELETE/bookings/{id}Cancel booking
GET/bookings-statsBooking statistics

Transactions

MethodEndpointDescription
GET/transactionsList transactions
GET/transactions/{id}Get transaction
PUT/transactions/{id}Refund transaction
GET/transactions-statsTransaction statistics

Announcements

MethodEndpointDescription
GET/announcementsList announcements
POST/announcementsCreate announcement
GET/announcements/{id}Get announcement
PUT/announcements/{id}Update announcement
DELETE/announcements/{id}Delete announcement
GET/announcements-statsAnnouncement statistics

Users (Super Admin)

MethodEndpointDescription
GET/usersList users
POST/usersCreate user
GET/users/{id}Get user
PUT/users/{id}Update user
DELETE/users/{id}Delete user

Support Tickets

MethodEndpointDescription
GET/ticketsList tickets
POST/ticketsCreate ticket
GET/tickets/{id}Get ticket
PUT/tickets/{id}Update ticket
POST/tickets/{id}/messagesAdd message
PATCH/tickets/{id}/statusChange status
PATCH/tickets/{id}/closeClose ticket
GET/tickets/statsTicket statistics

History

MethodEndpointDescription
GET/historiesList history

Media

MethodEndpointDescription
POST/uploadUpload media

Response Format

All responses follow the standard format:

json
{
  "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=20

Response includes pagination metadata:

json
{
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 20,
    "total": 100
  }
}

Daakey Car Sharing Platform