Skip to content

Delete Booking

Delete a booking (cancel with refund).

Endpoint

INFO

DELETE /api/v1/dashboard/bookings/{booking}

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
bookingintegerBooking ID

Request Body

ParameterTypeRequiredDescription
reasonstringNoCancellation reason
refund_amountdecimalNoCustom refund amount
full_refundbooleanNoIssue full refund

Example Request

bash
curl -X DELETE https://api.daakey.com/api/v1/dashboard/bookings/1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{
    "reason": "Vehicle issue - customer compensation",
    "full_refund": true
  }'

Response

Success (200)

json
{
  "success": true,
  "message": "Booking cancelled",
  "data": {
    "id": 1,
    "reference": "BK-2024-00001",
    "status": "cancelled",
    "cancelled_at": "2024-01-15T12:00:00Z",
    "cancellation_reason": "Vehicle issue - customer compensation",
    "refund": {
      "amount": 332.00,
      "status": "processing"
    }
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Error (400)

json
{
  "success": false,
  "message": "Cannot cancel booking",
  "data": {
    "reason": "Booking has already ended"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Dashboard users can override cancellation policy
  • Completed bookings cannot be cancelled

Daakey Car Sharing Platform