Client Bookings
Retrieve all bookings for a specific client.
Endpoint
INFO
GET /api/v1/dashboard/clients/{client}/bookings
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
client | integer | Client ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter by status |
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/clients/1/bookings" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Client bookings retrieved",
"data": [
{
"id": 50,
"reference": "BK-2024-00050",
"status": "completed",
"vehicle": {
"id": 1,
"plate_number": "ABC-123",
"brand": "Toyota",
"model": "Corolla"
},
"start_date": "2024-01-10T10:00:00Z",
"end_date": "2024-01-10T18:00:00Z",
"total": 120.00,
"created_at": "2024-01-08T00:00:00Z"
},
{
"id": 45,
"reference": "BK-2024-00045",
"status": "completed",
"vehicle": {
"id": 2,
"plate_number": "XYZ-789",
"brand": "Honda",
"model": "CR-V"
},
"start_date": "2024-01-05T09:00:00Z",
"end_date": "2024-01-05T17:00:00Z",
"total": 160.00,
"created_at": "2024-01-03T00:00:00Z"
}
],
"meta": {
"client": {
"id": 1,
"name": "John Doe"
},
"current_page": 1,
"last_page": 2,
"per_page": 15,
"total": 15
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}