Partner Statistics
Retrieve statistics for all partners or a specific partner.
WARNING
Requires super-admin role.
Endpoint
INFO
GET /api/v1/dashboard/partners-stats
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
partner_id | integer | - | Filter by specific partner |
period | string | month | Period: day, week, month, year |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/partners-stats?period=month" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Partner statistics retrieved",
"data": {
"summary": {
"total_partners": 10,
"active_partners": 8,
"inactive_partners": 2
},
"top_partners": [
{
"id": 1,
"name": "Acme Car Rentals",
"agencies_count": 5,
"vehicles_count": 120,
"bookings_count": 450,
"revenue": 75000.00
},
{
"id": 2,
"name": "City Mobility",
"agencies_count": 3,
"vehicles_count": 75,
"bookings_count": 280,
"revenue": 45000.00
}
],
"growth": {
"new_partners": 2,
"new_agencies": 5,
"new_vehicles": 50
},
"currency": "USD"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}