Booking Creation
About 747 wordsAbout 2 min
2026-03-27
POST Booking Creation
This API is used to create a hotel booking.
⚠️ Note:
- Before creating a booking, we will call the Price Confirmation API to obtain the ReferenceNo, with the parameter "PreBook": true.
- The booking request parameters must remain consistent with the PriceConfirm request (such as check-in/check-out dates, number of guests, number of rooms, etc.).
Endpoint
POST /booking/HotelBookingConfirm?$format=jsonRequest Parameters
{
"CheckOutDate": "2025-12-23",
"CheckInDate": "2025-12-22",
"NumOfRooms": 1,
"GuestList": [
{
"RoomNum": 1,
"GuestInfo": [
{
"IsAdult": true,
"Name": {
"Last": "四",
"First": "李"
}
},
{
"IsAdult": false,
"Age": 0
}
]
}
],
"Contact": {
"Name": {
"Last": "li",
"First": "Lucas"
},
"Email": "455407767@qq.com",
"Phone": "19909258553"
},
"ClientReference": "251000067",
"ReferenceNo": "15442173799"
}| Field | Type | Required | Description |
|---|---|---|---|
| CheckOutDate | DateTime | Yes | Check-out date |
| CheckInDate | DateTime | Yes | Check-in date |
| NumOfRooms | Number | Yes | Number of rooms |
| GuestList | List | Yes | Guest information |
| Contact | Object | Yes | Contact information |
| ClientReference | String | No | Client reference |
| ReferenceNo | String | Yes | Reference number from price confirmation |
GuestList
| Field | Type | Required | Description |
|---|---|---|---|
| RoomNum | Number | Yes | Room number |
| GuestInfo | List | Yes | Guest list |
GuestInfo
| Field | Type | Required | Description |
|---|---|---|---|
| Name.First | String | No | First name |
| Name.Last | String | No | Last name |
| IsAdult | Boolean | Yes | Whether the guest is an adult |
| Age | Number | No | Age (required for children) |
| Gender | String | No | Gender (M/F) |
| Phone | String | No | Phone number |
| String | No |
Contact
| Field | Type | Required | Description |
|---|---|---|---|
| Name.First | String | Yes | First name |
| Name.Last | String | Yes | Last name |
| Phone | String | Yes | Phone |
| String | Yes |
Request Example
curl --location --request POST '{{domain}}/booking/HotelBookingConfirm?$format=json' \
--header 'Authorization: PHT apikey={{api_key}},signature={{signature}},timestamp={{timestamp}}' \
--header 'api_key: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"CheckOutDate":"2025-12-23",
"CheckInDate":"2025-12-22",
"NumOfRooms":1,
"GuestList":[
{
"RoomNum":1,
"GuestInfo":[
{
"IsAdult":true,
"Name":{
"Last":"四",
"First":"李"
}
},
{
"IsAdult":false,
"Age":0
}
]
}
],
"Contact":{
"Name":{
"Last":"li",
"First":"Lucas"
},
"Email":"455407767@qq.com",
"Phone":"19909258553"
},
"ClientReference":"251000067",
"ReferenceNo":"15442173799"
}'Response Example
{
"Success": {
"BookingDetails": {
"BookingID": "15442173799",
"Status": 2,
"CheckInDate": "2025-12-22 00:00:00",
"CheckOutDate": "2025-12-23 00:00:00",
"OrderDate": "2025-10-23 17:46:03.877",
"NumOfRooms": 1,
"TotalPrice": 154,
"GuestList": [
{
"RoomNum": 1,
"GuestInfo": [
{
"Name": {
"First": "李",
"Last": "四"
},
"IsAdult": true
},
{
"Age": 0,
"IsAdult": false
}
]
}
],
"Contact": {
"Name": {
"First": "Lucas",
"Last": "li"
},
"Phone": "19909258553",
"Email": "455407767@qq.com"
},
"ClientReference": "251000067",
"Hotel": {
"HotelID": 1080044,
"HotelName": "贵族酒店 - 贝斯特韦斯特辛尼雀精选系列",
"Destination": {
"CityCode": "178305"
},
"RatePlanList": [
{
"RoomOccupancy": {
"RoomNum": 1,
"AdultCount": 1,
"ChildCount": 1,
"ChildAgeDetails": [0]
},
"RoomTypeID": 4673056,
"RatePlanID": "574308669677820045",
"RatePlanName": "1 King Bed...",
"Currency": "USD",
"TotalPrice": 154,
"PriceList": [
{
"Price": 154,
"StayDate": "2025-12-22 00:00:00"
}
]
}
],
"CancellationPolicyList": [
{
"LocalFromDate": "2026-03-24T23:00:00+07:00",
"Amount": 154
}
]
}
}
}
}Response Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| BookingID | String | Yes | Booking ID |
| Status | Number | Yes | Booking status |
| CheckInDate | DateTime | Yes | Check-in date |
| CheckOutDate | DateTime | Yes | Check-out date |
| OrderDate | DateTime | Yes | Booking time (Beijing time) |
| NumOfRooms | Number | Yes | Number of rooms |
| TotalPrice | Decimal | Yes | Total booking price |
| GuestList | List | Yes | Guest information |
| Contact | Object | Yes | Contact information |
| ClientReference | String | No | Client reference |
| CustomerRequest | String | No | Special request |
| Hotel | Object | Yes | Hotel information |
| ConfirmationCode | String | No | Hotel confirmation code |
GuestList
| Field | Type | Required | Description |
|---|---|---|---|
| RoomNum | Number | Yes | Room number |
| GuestInfo | List | Yes | Guest list |
GuestInfo
| Field | Type | Required | Description |
|---|---|---|---|
| Name | Object | No | Guest name |
| Name.First | String | No | First name |
| Name.Last | String | No | Last name |
| Age | Number | No | Age (required for children) |
| IsAdult | Boolean | Yes | Whether adult |
Contact
| Field | Type | Required | Description |
|---|---|---|---|
| Name | Object | Yes | Contact name |
| Name.First | String | Yes | First name |
| Name.Last | String | Yes | Last name |
| Phone | String | Yes | Phone |
| String | Yes |
Hotel
| Field | Type | Required | Description |
|---|---|---|---|
| HotelID | Number | Yes | Hotel ID |
| HotelName | String | Yes | Hotel name |
| Destination.CityCode | String | No | City code |
| RatePlanList | List | Yes | Rate plan information |
| CancellationPolicyList | List | No | Cancellation policies |
RatePlanList
| Field | Type | Required | Description |
|---|---|---|---|
| RoomOccupancy | Object | Yes | Occupancy info |
| RoomTypeID | Number | No | Room type ID |
| RatePlanID | String | Yes | Rate plan ID |
| RatePlanName | String | Yes | Rate plan name |
| Currency | String | Yes | Currency |
| TotalPrice | Decimal | Yes | Total room price |
| PriceList | List | Yes | Daily prices |
RoomOccupancy
| Field | Type | Required | Description |
|---|---|---|---|
| RoomNum | Number | Yes | Room number |
| AdultCount | Number | Yes | Number of adults |
| ChildCount | Number | Yes | Number of children |
| ChildAgeDetails | List | No | Children ages |
PriceList
| Field | Type | Required | Description |
|---|---|---|---|
| Price | Decimal | Yes | Daily price |
| StayDate | DateTime | Yes | Date |
CancellationPolicyList
| Field | Type | Required | Description |
|---|---|---|---|
| LocalFromDate | String | No | Local hotel time |
| Amount | Decimal | No | Cancellation penalty |