Skip to content

Recent Activity

Retrieve recent activity feed for the dashboard.

Endpoint

INFO

GET /api/v1/dashboard/recent-activity

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Number of activities
typestring-Filter: booking, vehicle, client, payment

Example Request

bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/recent-activity?limit=10" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Recent activity retrieved",
  "data": [
    {
      "id": 1,
      "type": "booking",
      "action": "created",
      "description": "New booking BK-2024-00100 created by John Doe",
      "subject": {
        "type": "booking",
        "id": 100,
        "reference": "BK-2024-00100"
      },
      "actor": {
        "type": "client",
        "id": 50,
        "name": "John Doe"
      },
      "created_at": "2024-01-15T10:00:00Z"
    },
    {
      "id": 2,
      "type": "vehicle",
      "action": "unlocked",
      "description": "Vehicle ABC-123 unlocked for booking BK-2024-00100",
      "subject": {
        "type": "vehicle",
        "id": 1,
        "plate_number": "ABC-123"
      },
      "actor": {
        "type": "client",
        "id": 50,
        "name": "John Doe"
      },
      "created_at": "2024-01-15T10:05:00Z"
    },
    {
      "id": 3,
      "type": "payment",
      "action": "captured",
      "description": "Payment of $88.00 captured for booking BK-2024-00099",
      "subject": {
        "type": "transaction",
        "id": 200,
        "amount": 88.00
      },
      "actor": {
        "type": "system",
        "name": "System"
      },
      "created_at": "2024-01-15T09:30:00Z"
    },
    {
      "id": 4,
      "type": "client",
      "action": "registered",
      "description": "New client Jane Smith registered",
      "subject": {
        "type": "client",
        "id": 51,
        "name": "Jane Smith"
      },
      "actor": {
        "type": "client",
        "id": 51,
        "name": "Jane Smith"
      },
      "created_at": "2024-01-15T09:00:00Z"
    }
  ],
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Activity Types

TypeDescription
bookingBooking-related activities
vehicleVehicle control and status changes
clientClient registrations and updates
paymentPayment transactions
damageVehicle damage reports

Daakey Car Sharing Platform