Agency Details
Retrieve detailed information about a specific agency.
WARNING
Requires super-admin or partner role.
Endpoint
INFO
GET /api/v1/dashboard/agencies/{agency}
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
agency | integer | Agency ID |
Example Request
bash
curl -X GET https://api.daakey.com/api/v1/dashboard/agencies/1 \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Agency retrieved",
"data": {
"id": 1,
"name": "Downtown Branch",
"code": "ACME-DT",
"partner": {
"id": 1,
"name": "Acme Car Rentals"
},
"email": "downtown@acme.com",
"phone": "+1234567890",
"address": "123 Main St, Downtown, NY 10001",
"location": {
"latitude": 40.7128,
"longitude": -74.0060
},
"timezone": "America/New_York",
"logo_url": "https://api.daakey.com/storage/agencies/1/logo.png",
"status": "active",
"secret_key_preview": "sk_live_xxxx...xxxx",
"settings": {
"booking_advance_days": 90,
"min_booking_hours": 1,
"max_booking_days": 30,
"cancellation_hours": 24,
"deposit_required": true,
"deposit_amount": 200.00
},
"stats": {
"vehicles_count": 25,
"clients_count": 500,
"active_bookings": 8,
"total_bookings": 1500
},
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T00:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Secret key is partially masked for security
- Use regenerate-key endpoint to get a new secret key