Partner Agencies
Retrieve all agencies belonging to a specific partner.
WARNING
Requires super-admin role.
Endpoint
INFO
GET /api/v1/dashboard/partners/{partner}/agencies
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
partner | integer | Partner ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter: active, inactive |
page | integer | 1 | Page number |
per_page | integer | 15 | Items per page |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/partners/1/agencies" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Partner agencies retrieved",
"data": [
{
"id": 1,
"name": "Downtown Branch",
"code": "ACME-DT",
"email": "downtown@acme.com",
"phone": "+1234567890",
"address": "123 Main St, Downtown",
"status": "active",
"vehicles_count": 25,
"active_bookings_count": 8,
"created_at": "2024-01-01T00:00:00Z"
},
{
"id": 2,
"name": "Airport Branch",
"code": "ACME-AP",
"email": "airport@acme.com",
"phone": "+1234567891",
"address": "456 Airport Blvd",
"status": "active",
"vehicles_count": 50,
"active_bookings_count": 20,
"created_at": "2024-01-15T00:00:00Z"
}
],
"meta": {
"partner": {
"id": 1,
"name": "Acme Car Rentals",
"agencies_limit": 10
},
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 2
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}