hotel-api-booking-flow
Hotel API 1.7
Booking Flow
Path: /api/HotelApi/BookHotelAPI
Method Type :Post
Submits a hotel booking for the selected room/rate. The request includes the search session, request token, final selling amount, hotel and stay details, customer information, and optional preferences.
Prerequisite: GetHotelListByHotelIdsAPI must be called before BookHotelAPI. Use the session and request token associated with the selected search/rate.
Request description
- sessionId (string, mandatory)
A unique identifier for the session, obtained from the previous availability search request. It ensures that the booking is made within the same session. - requestToken (string, mandatory)
Unique request token obtained from the previous availability search request. It ensures that the booking is made for a specified room request. - finalSellingAmount(decimal, mandatory)
This represents the final selling amount for the booking. It will be compared with the current hotel search price, and if there is a price difference, the booking will not be allowed. - HotelId (string, mandatory)
The unique identifier for the hotel being booked. - checkinDate (string, mandatory)
The check-in date of the booking in the format YYYY/MM/DD. - checkoutDate (string, mandatory)
The check-out date of the booking in the format YYYY/MM/DD.
Special Requests
- specialRequests (array, optional)
A list of special requests for specific rooms.- roomNo (integer, mandatory)
The room number (starting from 0) to which the special request applies. - specialRequestId (string, optional)
A unique identifier for the type of special request, if applicable. - specialRequestContent (string, optional)
A description or details of the special request.
- roomNo (integer, mandatory)
Customer Details
- listOfCustomers (array, mandatory)
A list of guests included in the booking.- room (int, mandatory)
Room number associated with the guest, according to the search request. - title (string, mandatory)
The guest’s title (e.g., “MR”, “MRS”, “MS”). - firstName (string, mandatory)
The guest’s first name. - lastName (string, mandatory)
The guest’s last name. - fullName (string, optional)
The full name of the guest (useful for display purposes). - contactNumber (string, mandatory)
The guest’s contact number, including the country code. - email (string, mandatory)
The guest’s email address, used for booking confirmation. - confirmationNumber (string, optional)
A confirmation number for the guest if applicable. - type (string, mandatory)
Specifies the type of traveler:- “AD” -> Adult
- “CH” -> Child
- age (string, optional)
The age of the guest (mandatory for children, optional for adults). - isLeadPax (boolean, mandatory)
Specifies if the guest is the primary contact for the booking:- true: Lead guest responsible for booking.
- false: Additional guest.
- room (int, mandatory)
- listOfCustomers (array, mandatory)
Loyalty & Membership Details
- loyaltyId (array, optional)
A list of loyalty program identifiers associated with the booking. - memberId (array, optional)
A list of member IDs for loyalty programs. - programId (array, optional)
A list of program identifiers linked to the loyalty programs.
- loyaltyId (array, optional)
Request sample
Request 1: (1Room 1A)
{
"sessionId": "67b5a798962344851465d104",
"finalSellingAmount": 971.40,
"specialRequests": [
{
"roomNo": 0,
"specialRequestId": "",
"specialRequestContent": ""
}
],
"listOfCustomers": [
{
"room": 1,
"title": "MR",
"firstName": "Uday",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "AD",
"age": "40",
"isLeadPax": true
}
],
"HotelId": "869759",
"CheckInDate": "2025-04-24",
"CheckOutDate": "2025-04-26",
"requestToken":"1fc834af-e237-4926-92b6-d82edc0a5819",
"loyaltyId": null,
"memberId": null,
"programId": null
}
Request 2: Room (1A1C, 2A1C)
{
"sessionId": "67af1bf86c26cc01b9069c9c",
"finalSellingAmount": 981.40,
"specialRequests": [
{
"roomNo": 0,
"specialRequestId": "",
"specialRequestContent": ""
}
],
"listOfCustomers": [
{
"room": 1,
"title": "MR",
"firstName": "Uday",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "AD",
"age": "40",
"isLeadPax": true
},
{
"room": 1,
"title": "MR",
"firstName": "Udaych",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "CH",
"age": "01",
"isLeadPax": false
},
{
"room": 2,
"title": "MR",
"firstName": "Uday1",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "AD",
"age": "40",
"isLeadPax": false
},
{
"room": 2,
"title": "MR",
"firstName": "UdaychA",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "AD",
"age": "02",
"isLeadPax": false
},
{
"room": 2,
"title": "MR",
"firstName": "UdaychB",
"lastName": "ff",
"fullName": "f",
"contactNumber": "0097148848484",
"email": "support@travelclub.ae",
"confirmationNumber": "",
"type": "CH",
"age": "02",
"isLeadPax": false
}
],
"HotelId": "869759",
"CheckInDate": "2025-04-24",
"CheckOutDate": "2025-04-26",
"requestToken":"1fc834af-e237-4926-92b6-d82edc0a5819",
"loyaltyId": null,
"memberId": null,
"programId": null
}
Response:
{
"error": null,
"status": true,
"confirmationNumbers": [
“7753497759166"
],
"bookingReferenceNumber": "CLBH52381",
"hotelConfirmationNumber":null,
"bookingStatus": "Success",
"bookingAmount": 1681.86,
"currency": "AED"
}
Response Description
Here is a description of each field in the provided JSON response:
- error:
- Description: This field contains details about any errors that occurred during the booking process. If the booking is successful, this field is typically null.
- Type object or null
- status:
- Description: A boolean value indicating whether the booking request was successful (true) or failed (false).
- Type: boolean
- bookingReferenceNumber:
- Description: A unique identifier for the booking, generated when the booking is successfully confirmed.
- Type: string
- bookingStatus:
- Description: A string indicating the current status of the booking. Common values include “Success”, “Confirmed”, “Pending”, or “Failed”.
- Type: string
- confirmationNumbers:
- Description: List of the confirmation numbers.
- Type: Array
- hotelConfirmationNumber:
- Description: Hotel confirmation number.
- Type: string
- bookingAmount:
- Description: Hotel booking amount.
- Type: Decimal
- currency:
- Description: Hotel booking currency.
- Type: string
- error: