Cancel Booking
Cancel a confirmed booking that hasn't started yet. This endpoint allows users to cancel their reservations and receive a refund according to the agency's cancellation policy.
Cancellation is a common need when travel plans change, and Daakey makes it easy while still protecting agencies from last-minute cancellations. The refund amount depends on how far in advance the cancellation is made—earlier cancellations typically receive higher refunds.
Important
- Only bookings with status
upcomingcan be cancelled - Once a booking is
active(the rental period has started), it cannot be cancelled—it must be ended instead - Refunds are processed to the original payment method
Endpoint
INFO
POST /api/v1/client/bookings/{id}/cancel
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Booking ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
reason | string | No | Cancellation reason |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/client/bookings/1/cancel \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}" \
-d '{
"reason": "Change of plans"
}'Response
Success (200)
json
{
"success": true,
"message": "Booking cancelled successfully",
"data": {
"id": 1,
"status": "cancelled",
"cancelled_at": "2024-01-16T00:00:00Z",
"cancellation_reason": "Change of plans",
"refund": {
"amount": 70.40,
"status": "processing",
"method": "Original payment method"
}
},
"meta": {
"agency_id": 123,
"agency_code": "AGENCY123"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (400) - Cannot Cancel
json
{
"success": false,
"message": "Booking cannot be cancelled",
"data": {
"reason": "Booking has already started"
},
"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"
}Cancellation Policy
The refund amount depends on when the booking is cancelled:
| Time Before Start | Refund |
|---|---|
| > 24 hours | 100% |
| 12 - 24 hours | 50% |
| < 12 hours | 0% |
WARNING
Cancellation policy may vary by agency. Check the booking details for specific terms.
Notes
- Only
upcomingbookings can be cancelled - Active bookings must be ended, not cancelled
- Refunds are processed within 5-10 business days