Booking Details
Retrieve comprehensive information about a specific booking, including vehicle details, pricing breakdown, pickup/dropoff locations, and current status. This endpoint is used to display the full booking details screen in the mobile app.
The response includes real-time information about the booking state, such as whether it can be cancelled or extended. For active bookings, this endpoint provides the essential information needed to operate the vehicle, including the station address and access instructions.
Use this endpoint when:
- Displaying a booking confirmation screen after reservation
- Showing detailed trip information when the user taps on a booking
- Checking if a booking can be modified or cancelled
- Getting pickup location details for navigation
Endpoint
INFO
GET /api/v1/client/bookings/{booking}
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
booking | integer | Booking ID |
Example Request
bash
curl -X GET https://api.daakey.com/api/v1/client/bookings/1 \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Response
Success (200)
json
{
"success": true,
"message": "Booking retrieved",
"data": {
"id": 1,
"reference": "BK-2024-00001",
"status": "active",
"start_date": "2024-01-15T10:00:00Z",
"end_date": "2024-01-15T18:00:00Z",
"actual_start": "2024-01-15T10:05:00Z",
"actual_end": null,
"vehicle": {
"id": 1,
"plate_number": "ABC-123",
"brand": "Toyota",
"model": "Corolla",
"year": 2023,
"color": "White",
"category": "sedan",
"image": "https://api.daakey.com/storage/vehicles/1/image.jpg",
"features": ["AC", "Bluetooth", "GPS"]
},
"pickup_station": {
"id": 1,
"name": "Downtown Station",
"address": "123 Main St, New York, NY",
"latitude": 40.7128,
"longitude": -74.0060
},
"dropoff_station": {
"id": 1,
"name": "Downtown Station",
"address": "123 Main St, New York, NY",
"latitude": 40.7128,
"longitude": -74.0060
},
"pricing": {
"duration_hours": 8,
"hourly_rate": 15.00,
"subtotal": 64.00,
"tax": 6.40,
"deposit": 200.00,
"total": 270.40,
"currency": "USD"
},
"payment": {
"method": "Visa •••• 4242",
"status": "paid",
"paid_at": "2024-01-15T10:05:00Z"
},
"can_cancel": false,
"can_extend": true,
"created_at": "2024-01-10T00:00:00Z"
},
"meta": {
"agency_id": 123,
"agency_code": "AGENCY123"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (404)
json
{
"success": false,
"message": "Booking not found",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Only the booking owner can view booking details
can_cancelindicates if the booking can still be cancelledcan_extendindicates if the booking can be extended