Skip to content

Damage Statistics

Retrieve statistics for vehicle damages.

Endpoint

INFO

GET /api/v1/dashboard/damages-stats

Headers

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Query Parameters

ParameterTypeDefaultDescription
periodstringmonthPeriod: day, week, month, year

Example Request

bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/damages-stats" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Damage statistics retrieved",
  "data": {
    "summary": {
      "total": 25,
      "pending": 5,
      "resolved": 20,
      "total_cost": 5500.00
    },
    "by_status": {
      "reported": 3,
      "assessing": 2,
      "repairing": 0,
      "resolved": 20
    },
    "by_severity": {
      "minor": 15,
      "moderate": 8,
      "severe": 2
    },
    "by_type": {
      "scratch": 12,
      "dent": 8,
      "crack": 3,
      "stain": 2
    },
    "most_damaged_vehicles": [
      {
        "vehicle_id": 5,
        "plate_number": "DEF-456",
        "damages_count": 4,
        "total_cost": 1200.00
      }
    ],
    "average_resolution_days": 3.5,
    "currency": "USD"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Daakey Car Sharing Platform