Create a Booking - API

At this stage, you will create and confirm the booking.

API details

POST /api/v1/hotel/booking-api/booking/create-booking

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Accept-Encoding

gzip

Body

Name
Type
Description

hotelId

Integer

HotelId

tokenNumber

String

Unique code for an availability request received from availability response.

rateKey

String

Unique key of the specific room received from availability response

fromDate

String

checkin date

toDate

String

checkout date

noOfAdults

Integer

No of adults in a room

noOfChildren

Integer

No of children in a room

childrenAges

Array

Age of each children in a room

nationality

String

nationality of the guest

travellerDetails

Array

roomId title firstName lastName type: adult/child

Sample Request
{
    "hotelId": 112,
    "rateKey": "40221e490acbd10955a41d128029a56e",
    "tokenNumber": "RA_1728413337142",
    "fromDate": "2024-10-17",
    "toDate": "2024-10-20",
    "rooms": [
        {
            "noOfAdults": 1,
            "noOfChildren": 0,
            "childrenAges": []
        }
    ],
    "nationality": "IN",
    "travellerDetails": [
        {
            "roomId": 1,
            "title": "Mr",
            "firstName": "First Name",
            "lastName": "Last Name",
            "type": "adult"
        }
    ]
}

Response details

Name
Type
Description

referenceNumber

String

Unique code for a booking

hotelBookingConfNo

String

Booking Confirmation number from hotel

status

String

booking status

message

String

message for booking

Sample Response
{
    "success": true,
    "data": {
        "status": "confirmed",
		"referenceNumber": "B2BHOT_1728453656963",
		"hotelBookingConfNo": "1_238-2536737_1",
        "message": "confirmed Succesfully",      
    }
}

Types of status

Value
Description

confirmed

This status indicates that your order is confirmed by the hotel. You will receive hotel Booking Confirmation Number in the response

booked

This status indicates that your order is confirmed by the supplier, but the hotel confirmation is pending. You will not receive hotel Booking Confirmation Number at this stage. Once the hotel confirms the booking, we will send you a Webhook with necessary data. please refer to the Webhook section for more details.

Last updated