Skip to content

Ticket Statistics

Retrieve statistics for support tickets.

Endpoint

INFO

GET /api/v1/dashboard/tickets/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/tickets/stats?period=month" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Response

Success (200)

json
{
  "success": true,
  "message": "Ticket statistics retrieved",
  "data": {
    "summary": {
      "total": 150,
      "by_status": {
        "open": 15,
        "in_progress": 10,
        "resolved": 100,
        "closed": 25
      }
    },
    "by_priority": {
      "low": 30,
      "normal": 80,
      "high": 30,
      "critical": 10
    },
    "by_category": {
      "vehicle_issue": 50,
      "booking": 40,
      "billing": 30,
      "account": 15,
      "general": 15
    },
    "performance": {
      "average_response_time_minutes": 15,
      "average_resolution_time_hours": 4.5,
      "first_contact_resolution_rate": 65.0
    },
    "by_agent": [
      {
        "id": 2,
        "name": "Support Agent",
        "tickets_handled": 45,
        "avg_resolution_hours": 3.2
      }
    ],
    "trends": {
      "new_tickets_today": 5,
      "resolved_today": 8,
      "trend": "-5%"
    }
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Daakey Car Sharing Platform