1、Getting Started
2、Content API
3、Booking API
4、Information Hub
5、FAQ
This API is used to create a new booking. Before creating a booking, a booking reference needs to be provided. This reference is returned in the price confirm response.
Parameters such as the check-in date, check-out date, number of rooms, and occupancy details must be provided and these details must match the parameters in the price confirm response. It ensures the consistency and accuracy of the booking information.
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"NumOfRooms": 1,
"GuestList": [
{
"RoomNum": 1,
"GuestInfo": [
{
"Name": {
"Last": "ye",
"First": "vincent"
},
"IsAdult": true
},
{
"Name": {
"First": "ye",
"Last": "vincent"
},
"IsAdult": false,
"Age": 1
}
]
}
],
"Contact": {
"Name": {
"Last": "ye",
"First": "vincent"
},
"Email": "1476817418@qq.com",
"Phone": "18328376425"
},
"ClientReference": "v-test-2023-06-28",
"ReferenceNo": "1674000176857108480"
}
<HotelBookingConfirmRQ>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<ReferenceNo>1674000176857108480</ReferenceNo>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<NumOfRooms>1</NumOfRooms>
<GuestList>
<Room RoomNum="1">
<GuestInfo>
<Name First="vincent" Last="ye" />
<IsAdult>true</IsAdult>
</GuestInfo>
<GuestInfo>
<Name First="vincent" Last="ye" />
<Age>1</Age>
<IsAdult>false</IsAdult>
</GuestInfo>
</Room>
</GuestList>
<Contact>
<Name First="vincent" Last="ye" />
<Phone>18328376425</Phone>
<Email>1476817418@qq.com</Email>
</Contact>
<ClientReference>v-test-2023-06-28</ClientReference>
</HotelBookingConfirmRQ>
[
{
"name": "Header",
"description": "Client authentication info",
"children": [
{
"name": "ClientID",
"description": "Client ID"
},
{
"name": "LicenseKey",
"description": "Client password"
}
]
},
{
"name": "ReferenceNo",
"description": "Populated with ReferenceNo from the response of Price Confirm step"
},
{
"name": "CheckInDate",
"description": "Check-indate"
},
{
"name": "CheckOutDate",
"description": "Check-outdate"
},
{
"name": "NumOfRooms",
"description": "Number of rooms"
},
{
"name": "GuestList",
"description": "Guest info Collection",
"children": [
{
"name": "GuestInfo",
"description": "Guest info node Collection",
"children": [
{
"name": "Name",
"description": "Guest name",
"children": [
{
"name": "First",
"description": "Guest first name"
},
{
"name": "Last",
"description": "Guest last name"
}
]
},
{
"name": "Gender",
"description": "Gender. M: Male. F: Femail. Only can be M/F"
},
{
"name": "Phone",
"description": "Guest phone"
},
{
"name": "Address",
"description": "Guest address"
},
{
"name": "Email",
"description": "Guest email"
},
{
"name": "Age",
"description": "Guest age. Optional for adults. Mandatory for children."
},
{
"name": "IsAdult",
"description": "Is the guest an adult"
}
]
},
{
"name": "RoomNum",
"description": "Booking room index"
}
]
},
{
"name": "Contact",
"description": "Contact info. This can be guest's contact info or your customer service team's contact info",
"children": [
{
"name": "Name",
"description": "Booking contact name",
"children": [
{
"name": "First",
"description": "Contact first name"
},
{
"name": "Last",
"description": "Contact last name"
}
]
},
{
"name": "Phone",
"description": "Contact phone"
},
{
"name": "Email",
"description": "Contact email"
}
]
},
{
"name": "CustomerRequest",
"description": "Customer request. Dida will pass this to supplier or hotel. We will try our best to meet your requirements, but we cannot guarantee that all of them can be satisfied."
},
{
"name": "ClientReference",
"description": "Client reference. BookingID on your side. Please note that your BookingID has a one-to-one binding relationship with our order (ReferenceNo) and cannot be repeated. If you don't provide the value of this field, then you don't need to worry about the one-to-one binding problem mentioned above."
},
{
"name": "PaymentInfo",
"description": "Payment Information",
"children": [
{
"name": "CreditCardInfo",
"description": "Credit card information",
"children": [
{
"name": "CardNumber",
"description": "Credit card number"
},
{
"name": "CardExpirationYear",
"description": "The year of the card expiration (4 digits)"
},
{
"name": "CardExpirationMonth",
"description": "The month of credit card expiration (2 digits)"
},
{
"name": "CardCVV",
"description": "Card Verification Value"
},
{
"name": "CardHolderName",
"description": "The name of card owner"
},
{
"name": "CardHolderCountry",
"description": "The region code of card owner (ISO3166-2)"
},
{
"name": "CardHolderEmail",
"description": "The email of card owner"
},
{
"name": "CardHolderCity",
"description": "The city of card owner"
},
{
"name": "CardHolderAddress",
"description": "The address of card owner"
},
{
"name": "CardHolderZip",
"description": "The zip code of card owner"
}
]
}
]
}
]
Header HeaderType | Client authentication info | HeaderType | |
ReferenceNo String | Populated with ReferenceNo from the response of Price Confirm step | String | |
CheckInDate DateTime | Check-indate | DateTime | |
CheckOutDate DateTime | Check-outdate | DateTime | |
NumOfRooms Int32 | Number of rooms | Int32 | |
GuestList List<GuestListTypeRoom> | Guest info Collection | List<GuestListTypeRoom> | |
Contact ContactType Mandatory | Contact info. This can be guest's contact info or your customer service team's contact info | ContactTypeMandatory | |
CustomerRequest String | Customer request. Dida will pass this to supplier or hotel. We will try our best to meet your requirements, but we cannot guarantee that all of them can be satisfied. | String | |
ClientReference String Optional | Client reference. BookingID on your side. Please note that your BookingID has a one-to-one binding relationship with our order (ReferenceNo) and cannot be repeated. If you don't provide the value of this field, then you don't need to worry about the one-to-one binding problem mentioned above. | StringOptional | |
PaymentInfo PaymentInfoType Optional | Payment Information | PaymentInfoTypeOptional |
{
"Header": {
"ClientID": "DidaApiTestID",
"LicenseKey": "TestKey"
},
"CheckInDate": "2023-08-01",
"CheckOutDate": "2023-08-02",
"NumOfRooms": 1,
"GuestList": [
{
"RoomNum": 1,
"GuestInfo": [
{
"Name": {
"Last": "ye",
"First": "vincent"
},
"IsAdult": true
}
]
}
],
"Contact": {
"Name": {
"Last": "ye",
"First": "vincent"
},
"Email": "1476817418@qq.com",
"Phone": "18328376425"
},
"ClientReference": "v-test-2023-06-28",
"ReferenceNo": "1674000176857108480"
}
<HotelBookingConfirmRQ>
<Header>
<ClientID>DidaApiTestID</ClientID>
<LicenseKey>TestKey</LicenseKey>
</Header>
<ReferenceNo>1674000176857108480</ReferenceNo>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<NumOfRooms>1</NumOfRooms>
<GuestList>
<Room RoomNum="1">
<GuestInfo>
<Name First="vincent" Last="ye" />
<IsAdult>true</IsAdult>
</GuestInfo>
<GuestInfo>
<Name First="vincent" Last="ye" />
<Age>1</Age>
<IsAdult>false</IsAdult>
</GuestInfo>
</Room>
</GuestList>
<Contact>
<Name First="vincent" Last="ye" />
<Phone>18328376425</Phone>
<Email>1476817418@qq.com</Email>
</Contact>
<ClientReference>v-test-2023-06-28</ClientReference>
</HotelBookingConfirmRQ>
[
{
"name": "Error",
"description": "Error",
"children": [
{
"name": "Code",
"description": "Error code"
},
{
"name": "Message",
"description": "Error message"
},
{
"name": "BookingID",
"description": "Duplicate booking id. Will be populated while duplicate booking detected."
}
]
},
{
"name": "Success",
"description": "",
"children": [
{
"name": "BookingDetails",
"description": "Bookingdetails",
"children": [
{
"name": "BookingID",
"description": "Dida/Supplier booking ID"
},
{
"name": "Status",
"description": "Booking status. 0-PreBook, 2-Confirmed, 3-Canceled, 4-Failed, 5-Pending(InProcess), 6-OnRequest"
},
{
"name": "CheckInDate",
"description": "Check-indate"
},
{
"name": "CheckOutDate",
"description": "Check-outdate"
},
{
"name": "OrderDate",
"description": "Booking create date (Beijing time)"
},
{
"name": "NumOfRooms",
"description": "Number of rooms"
},
{
"name": "TotalPrice",
"description": "Total booking price"
},
{
"name": "GuestList",
"description": "Guest info Collection",
"children": [
{
"name": "GuestInfo",
"description": "Guest info node Collection",
"children": [
{
"name": "Name",
"description": "Guest name",
"children": [
{
"name": "First",
"description": "Guest first name"
},
{
"name": "Last",
"description": "Guest last name"
}
]
},
{
"name": "Gender",
"description": "Gender. M:Male. F:Femail"
},
{
"name": "Phone",
"description": "Guest phone"
},
{
"name": "Address",
"description": "Guest address"
},
{
"name": "Email",
"description": "Guest email"
},
{
"name": "Age",
"description": "Guest age. Optional for adults. Mandatory for children."
},
{
"name": "IsAdult",
"description": "Is the guest an adult"
}
]
},
{
"name": "RoomNum",
"description": "Booking room index"
}
]
},
{
"name": "Contact",
"description": "Contact info. This can be guest's contact info or your customer service team's contact info",
"children": [
{
"name": "Name",
"description": "Booking contact name",
"children": [
{
"name": "First",
"description": "Contact first name"
},
{
"name": "Last",
"description": "Contact last name"
}
]
},
{
"name": "Phone",
"description": "Contact phone"
},
{
"name": "Email",
"description": "Contact email"
}
]
},
{
"name": "CustomerRequest",
"description": "Customer request. Dida will pass this to supplier or hotel. We will try our best to meet your requirements, but we cannot guarantee that all of them can be satisfied."
},
{
"name": "ClientReference",
"description": "Client reference. BookingID on your side. Please note that your BookingID has a one-to-one binding relationship with our order (ReferenceNo) and cannot be repeated. If you don't provide the value of this field, then you don't need to worry about the one-to-one binding problem mentioned above."
},
{
"name": "ConfirmationCode",
"description": "Hotel Confirmation Number"
},
{
"name": "Hotel",
"description": "Booking hotel details",
"children": [
{
"name": "HotelID",
"description": "HotelID"
},
{
"name": "HotelName",
"description": "Hotel Name"
},
{
"name": "Destination",
"description": "Hotel destination info",
"children": [
{
"name": "CityCode",
"description": "Region code"
}
]
},
{
"name": "RatePlanList",
"description": "Booking rateplan details Collection",
"children": [
{
"name": "RoomOccupancy",
"description": "Occupancy details",
"children": [
{
"name": "ChildAgeDetails",
"description": "Child age details"
},
{
"name": "RoomNum",
"description": "Booking room index"
},
{
"name": "AdultCount",
"description": "Adult count"
},
{
"name": "ChildCount",
"description": "Child count"
}
]
},
{
"name": "RoomTypeID",
"description": "RoomTypeID"
},
{
"name": "RoomName",
"description": "Room Name"
},
{
"name": "RoomName_CN",
"description": "Room Name in CN"
},
{
"name": "RatePlanID",
"description": "RateplanID"
},
{
"name": "RatePlanName",
"description": "Rateplan name"
},
{
"name": "BedType",
"description": "BedtypeID"
},
{
"name": "BreakfastType",
"description": "BreakfasttypeID. Kind of obsolete. MealType is recommended. Please check MealType in Content API."
},
{
"name": "Currency",
"description": "Currency code"
},
{
"name": "TotalPrice",
"description": "Single room total price"
},
{
"name": "PriceList",
"description": "Price info Collection",
"children": [
{
"name": "Price",
"description": "Price"
},
{
"name": "StayDate",
"description": "StayDate"
},
{
"name": "MealType",
"description": "MealType"
},
{
"name": "MealAmount",
"description": "Regarding meal plans, Dida provides two fields to obtain information about the meal types. The first is BreakfastType, which in the Response only indicates the inclusion or exclusion of breakfast without specifying the number of meal servings. For clients developing the Dida API, this field is not recommended. The second is MealType, which not only represents the specific meal plan in the Response but is also accompanied by MealAmount to denote the number of meal servings included. If you utilize MealType, it is imperative to also parse the MealAmount field to avoid any interpretation errors or future disputes regarding the number of meal servings.Furthermore, in theory, the quantity of MealAmount is always less than or equal to the number of guests staying. For instance, if two guests are staying and MealAmount is 0, it means that breakfast is not included. A MealAmount of 1 indicates that only one breakfast serving is included, which is a scenario where some hotels may include one complimentary breakfast for two guests, and any additional servings would need to be purchased separately upon arrival. A MealAmount of 2 signifies that both guests have breakfast included in their stay."
}
]
},
{
"name": "StandardOccupancy",
"description": "Obsolete"
}
]
},
{
"name": "CancellationPolicyList",
"description": "Cancellation policy info Collection for whole booking",
"children": [
{
"name": "FromDate",
"description": "Date when the cancellation rule is applied (please be kindly note all the cancelation are based on Beijing time)"
},
{
"name": "Amount",
"description": "Cancellation penaly amount"
}
]
},
{
"name": "IncludedFeeList",
"description": "Included tax and fee list. For reference only. ",
"children": [
{
"name": "FeeTypeName",
"description": "Fee type name"
},
{
"name": "Currency",
"description": "Currency code"
},
{
"name": "Amount",
"description": "Fee Amount"
}
]
},
{
"name": "ExcludedFeeList",
"description": "Excluded tax and fee list. For reference only. Guest should pay them at property.",
"children": [
{
"name": "FeeTypeName",
"description": "Fee type name"
},
{
"name": "Currency",
"description": "Currency code"
},
{
"name": "Amount",
"description": "Fee Amount"
}
]
}
]
}
]
}
]
}
]
Error ErrorType | Error | ErrorType | |
Success HotelBookingConfirmRSSuccess | HotelBookingConfirmRSSuccess |
{
"Success": {
"BookingDetails": {
"TotalPrice": 299.13,
"OrderDate": "2023-06-28 18:21:58.877",
"CheckOutDate": "2023-08-02 00:00:00",
"CheckInDate": "2023-08-01 00:00:00",
"NumOfRooms": 1,
"Status": 2,
"GuestList": [
{
"RoomNum": 1,
"GuestInfo": [
{
"IsAdult": true,
"Name": {
"Last": "ye",
"First": "vincent"
}
}
]
}
],
"Contact": {
"Name": {
"Last": "ye",
"First": "vincent"
},
"Email": "1476817418@qq.com",
"Phone": "18328376425"
},
"Hotel": {
"HotelID": 512,
"Destination": {
"CityCode": "179900"
},
"RatePlanList": [
{
"TotalPrice": 299.13,
"RoomStatus": 1,
"BreakfastType": 1,
"BedType": 2,
"RoomOccupancy": {
"ChildCount": 0,
"AdultCount": 2,
"RoomNum": 1
},
"PriceList": [
{
"StayDate": "2023-08-01 00:00:00",
"Price": 299.13,
"MealAmount": 0,
"MealType": 1
}
],
"Currency": "USD",
"RatePlanName": "Double Standard Floor 19-30F (28-31sqm)",
"RatePlanID": "1494507509528725623"
}
],
"CancellationPolicyList": [
{
"Amount": 299.13,
"FromDate": "2023-07-29T14:00:00+08:00"
}
],
"IncludedFeeList": [
{
"Amount": 28.5,
"Currency": "USD",
"FeeTypeName": "tax_and_service_fee"
}
],
"ExcludedFeeList": [
{
"Amount": 2.73,
"Currency": "USD",
"FeeTypeName": "A tax is imposed by the city"
}
],
"HotelName": "Cerulean Tower Tokyu Hotel"
},
"ClientReference": "v-test-2023-06-28",
"CustomerRequest": "",
"BookingID": "1674000176857108480"
}
}
}
<HotelBookingConfirmRS>
<Success>
<BookingDetails>
<BookingID>1674000176857108480</BookingID>
<Status>2</Status>
<CheckInDate>2023-08-01</CheckInDate>
<CheckOutDate>2023-08-02</CheckOutDate>
<OrderDate>2023-06-28T18:21:58.877+08:00</OrderDate>
<NumOfRooms>1</NumOfRooms>
<TotalPrice>299.1300000000</TotalPrice>
<GuestList>
<Room RoomNum="1">
<GuestInfo>
<Name First="vincent" Last="ye" />
<IsAdult>true</IsAdult>
</GuestInfo>
<GuestInfo>
<Name First="vincent" Last="ye" />
<Age>1</Age>
<IsAdult>false</IsAdult>
</GuestInfo>
</Room>
</GuestList>
<Contact>
<Name First="vincent" Last="ye" />
<Phone>18328376425</Phone>
<Email>1476817418@qq.com</Email>
</Contact>
<CustomerRequest />
<ClientReference>v-test-2023-06-28</ClientReference>
<Hotel>
<HotelID>512</HotelID>
<HotelName>Cerulean Tower Tokyu Hotel</HotelName>
<Destination CityCode="179900" />
<RatePlanList>
<RatePlan>
<RoomOccupancy RoomNum="1" AdultCount="2" />
<RatePlanID>1494507509528725623</RatePlanID>
<RatePlanName>Double Standard Floor 19-30F (28-31sqm)</RatePlanName>
<BedType>2</BedType>
<BreakfastType>1</BreakfastType>
<RoomStatus>1</RoomStatus>
<Currency>USD</Currency>
<TotalPrice>299.1300000000</TotalPrice>
<PriceList>
<PriceInfo>
<Price>299.13</Price>
<StayDate>2023-08-01</StayDate>
<MealType>1</MealType>
<MealAmount>0</MealAmount>
</PriceInfo>
</PriceList>
</RatePlan>
</RatePlanList>
<CancellationPolicyList>
<CancellationPolicy>
<FromDate>2023-07-29T14:00:00+08:00</FromDate>
<Amount>299.1300000000</Amount>
</CancellationPolicy>
</CancellationPolicyList>
<IncludedFeeList>
<FeeInfo>
<FeeTypeName>tax_and_service_fee</FeeTypeName>
<Currency>USD</Currency>
<Amount>28.5</Amount>
</FeeInfo>
</IncludedFeeList>
<ExcludedFeeList>
<FeeInfo>
<FeeTypeName>A tax is imposed by the city</FeeTypeName>
<Currency>USD</Currency>
<Amount>2.73</Amount>
</FeeInfo>
</ExcludedFeeList>
</Hotel>
</BookingDetails>
</Success>
</HotelBookingConfirmRS>