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

bookingIdstringRequired
Unique identifier of the booking to cancel

Request

This endpoint expects an object.
dataType"RESTAURANT" or "EXPERIENCE" or "HOTEL"Required
reasonstringOptional
other_reasonstringOptional

Additional details when reason is OTHER (for Experience bookings)

Response

Booking cancelled successfully
successboolean or null
messagestring or null
bookingIdstring or null
dataTypeenum or null
Allowed values:
cancellationIdstring or null
Unique cancellation identifier
refundAmountdouble or null
Refund amount in currency units
refundStatusenum or null
Status of the refund process
Allowed values:
cancelledAtdatetime or null
ISO timestamp of cancellation
datamap from strings to any or null
Additional cancellation details from external API

Errors