Cancel Booking
Cancel a booking by ID for any vertical (Restaurant, Experience, Hotel).
## Supported Booking Types
- **RESTAURANT**: Restaurant reservations
- **EXPERIENCE**: Experience bookings (tours, activities)
- **HOTEL**: Hotel reservations
## Process Flow
1. Validates authorization token
2. Routes to appropriate external API based on dataType
3. Transforms response to standardized format
4. Returns cancellation details including refund information
**Note for Experience Bookings**: Cancellation is processed asynchronously by Headout. The API response indicates the cancellation request was submitted, not that it's completed. The actual cancellation status is updated via webhook or polling when Headout completes processing.
## External API Endpoints
- Restaurant: `POST {RESTAURANT_API_URL}/{bookingId}/cancel`
- Experience: `POST {EXPERIENCE_API_URL}/{bookingId}/cancel?reason=<reason>&other_reason=<optional>`
- Uses query parameters instead of request body
- Reason can be enum (TICKETS_NOT_RECEIVED, CHANGE_OF_TRAVEL_PLANS, etc.) or free text
- Cancellation is processed asynchronously by Headout
- Hotel: `POST {HOTEL_API_URL}/{bookingId}/cancel`
## Timeout
- Request timeout: 10 seconds per external API call
## Error Handling
- 400: Validation errors, missing parameters
- 401: Missing or invalid authorization token
- 404: Booking not found
- 502: External API errors, timeouts
- 500: Internal server errors
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
bookingId
Unique identifier of the booking to cancel
Request
This endpoint expects an object.
dataType
reason
other_reason
Additional details when reason is OTHER (for Experience bookings)
Response
Booking cancelled successfully
success
message
bookingId
dataType
Allowed values:
cancellationId
Unique cancellation identifier
refundAmount
Refund amount in currency units
refundStatus
Status of the refund process
Allowed values:
cancelledAt
ISO timestamp of cancellation
data
Additional cancellation details from external API
