Traveller's Choice Hotel API
  • 🚩Getting Started with Hotel API
  • πŸ•ΈοΈUnderstanding the API structure
  • πŸ”‘Authentication API
    • Access token
  • πŸ“šHotel Content API
    • Content API
      • Hotels Master
        • Hotels API
        • Hotel detail API
      • Location Master
        • countries
        • States
        • Cities
        • Areas
      • Types Master
        • Room Types Master
          • Room Types API
          • Room Types Detail API
        • Board Type Master
          • Board Types API
          • Board Types Detail API
        • Accommodation Type Master
          • Accommodation Types API
          • Accommodation Type Detail API
        • Chains Master
          • Chains API
          • Chain Detail API
        • Amenities Master
          • Amenities API
          • Amenity Detail API
        • Amenity Group Master
          • Amenity group API
          • Amenity Group Detail API
      • πŸ”„Sync Id
  • 🏨Hotel Booking API
    • Booking API
      • Availability APIs
        • MinRate Availability API
        • Availability API
      • Check Rate API
      • Booking APIs
        • Create a Booking - API
        • Booking Details API
        • Cancel Booking API
  • πŸ•΅οΈTest cases
    • Booking API
  • Webhook
  • Errors
    • Token Error
Powered by GitBook
On this page
  • API details
  • Response details
  1. Hotel Booking API
  2. Booking API
  3. Booking APIs

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.

PreviousBooking APIsNextBooking Details API

Last updated 7 months ago

🏨