# BookingSearch

This API allows you to search for bookings by using either the booking ID or other parameters. It's designed to provide a flexible way to locate specific booking information quickly and easily.Booking search. Can be searched by booking ID or other params.

Please note, all booking data for "DidaApiTestID" is used for testing purposes only. This data is not representative of actual bookings and is simply used to test the functionality of the booking search feature.

POST
https://apiint.didatravel.com/api/booking/HotelBookingSearch?$format=json
  • Search by Dida Booking ID: It is recommended to search for bookings using the Dida Booking ID.
{
	"Header": {
		"ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
	},
	"SearchBy": {
		"BookingID": "1674000176857108480"
	}
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingID>1674000176857108480</BookingID>
    </SearchBy>
</HotelBookingSearchRQ>

  • Search by Client Booking ID: It is also recommended to search for bookings using the Client Booking ID.
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingInfo": {
            "ClientReference": "v-test-2023-06-28"
        }
    }
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingInfo>
            <ClientReference>v-test-2023-06-28</ClientReference>
        </BookingInfo>
    </SearchBy>
</HotelBookingSearchRQ>

  • Search by Check-in Date Range: This feature allows you to search for bookings within a specific range of check-in dates.
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingInfo": {
            "CheckInDateRange":{
                "from": "2023-06-26",
                "to": "2023-06-26"
            }
        }
    }
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingInfo>
            <CheckInDateRange from="2023-06-26" to="2023-06-26" />
        </BookingInfo>
    </SearchBy>
</HotelBookingSearchRQ>

  • Search by Check-out Date Range: This feature allows you to search for bookings within a specific range of check-out dates.
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingInfo": {
            "CheckOutDateRange":{
                "from": "2023-06-27",
                "to": "2023-06-27"
            }
        }
    }
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingInfo>
            <CheckOutDateRange from="2023-06-27" to="2023-06-27" />
        </BookingInfo>
    </SearchBy>
</HotelBookingSearchRQ>

  • Search by Booking Create Date Range: This feature allows you to search for bookings within a specific range of creation dates.
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingInfo": {
            "BookDateRange":{
                "from": "2023-06-26",
                "to": "2023-06-26"
            }
        }
    }
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingInfo>
            <BookDateRange from="2023-06-26" to="2023-06-26" />
        </BookingInfo>
    </SearchBy>
</HotelBookingSearchRQ>

  • Search by Combined Condition: This feature allows you to search for bookings using multiple criteria at once. This could include a combination of booking ID, check-in date range, booking creation date range, and other parameters. By using combined conditions, you can narrow down your search results and locate specific bookings more accurately and quickly. This is particularly useful when you're dealing with a large volume of bookings and need to find specific ones based on a variety of factors.
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingInfo": {
            "CheckInDateRange":{
                "from": "2023-06-26",
                "to": "2023-06-27"
            },
            "CheckOutDateRange":{
                "from": "2023-06-26",
                "to": "2023-06-27"
            },
            "BookDateRange":{
                "from": "2023-06-26",
                "to": "2023-06-26"
            }
        }
    }
}
<HotelBookingSearchRQ>
    <Header>
        <ClientID>DidaApiTestID</ClientID>
        <LicenseKey>TestKey</LicenseKey>
    </Header>
    <SearchBy>
        <BookingInfo>
            <CheckInDateRange from="2023-06-26" to="2023-06-27" />
            <CheckOutDateRange from="2023-06-26" to="2023-06-27" />
            <BookDateRange from="2023-06-26" to="2023-06-26" />
        </BookingInfo>
    </SearchBy>
</HotelBookingSearchRQ>
In the following example, the code parameters inside are modifiable.
Use the following method to test API:
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingID": "1674000176857108480"
    }
}
In the following example, the code parameters inside are modifiable.
Use the following method to test API:
<HotelBookingSearchRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <SearchBy>
    <BookingID>1674000176857108480</BookingID>
  </SearchBy>
</HotelBookingSearchRQ>
   [
    {
        "name": "Header",
        "description": "Client authentication info",
        "children": [
            {
                "name": "ClientID",
                "description": "Client ID"
            },
            {
                "name": "LicenseKey",
                "description": "Client password"
            }
        ]
    },
    {
        "name": "SearchBy",
        "description": "Search condition",
        "children": [
            {
                "name": "BookingID",
                "description": "Dida BookingID"
            },
            {
                "name": "BookingInfo",
                "description": "Booking info",
                "children": [
                    {
                        "name": "GuestName",
                        "description": "Guest name",
                        "children": [
                            {
                                "name": "First",
                                "description": "Guest first name"
                            },
                            {
                                "name": "Last",
                                "description": "Guest last name"
                            }
                        ]
                    },
                    {
                        "name": "ContactName",
                        "description": "Contact name",
                        "children": [
                            {
                                "name": "First",
                                "description": "Contact first name"
                            },
                            {
                                "name": "Last",
                                "description": "Contact last name"
                            }
                        ]
                    },
                    {
                        "name": "Status",
                        "description": "Booking status"
                    },
                    {
                        "name": "CheckInDateRange",
                        "description": "Check-indaterange",
                        "children": [
                            {
                                "name": "from",
                                "description": "Start date"
                            },
                            {
                                "name": "to",
                                "description": "End date"
                            }
                        ]
                    },
                    {
                        "name": "CheckOutDateRange",
                        "description": "Check-outdaterange",
                        "children": [
                            {
                                "name": "from",
                                "description": "Start date"
                            },
                            {
                                "name": "to",
                                "description": "End date"
                            }
                        ]
                    },
                    {
                        "name": "BookDateRange",
                        "description": "Booking date range",
                        "children": [
                            {
                                "name": "from",
                                "description": "Start date"
                            },
                            {
                                "name": "to",
                                "description": "End date"
                            }
                        ]
                    },
                    {
                        "name": "CityCode",
                        "description": "City code"
                    },
                    {
                        "name": "ClientReference",
                        "description": "Client reference"
                    }
                ]
            }
        ]
    }
]
Request Parameters
Header HeaderType
Client authentication infoHeaderType
SearchBy HotelBookingSearchRQSearchBy
Search conditionHotelBookingSearchRQSearchBy
Request Sample
{
    "Header": {
        "ClientID": "DidaApiTestID",
        "LicenseKey": "TestKey"
    },
    "SearchBy": {
        "BookingID": "1674000176857108480"
    }
}
Request Sample
<HotelBookingSearchRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <SearchBy>
    <BookingID>1674000176857108480</BookingID>
  </SearchBy>
</HotelBookingSearchRQ>
   [
    {
        "name": "Error",
        "description": "",
        "children": [
            {
                "name": "Code",
                "description": "Error code"
            },
            {
                "name": "Message",
                "description": "Error message"
            }
        ]
    },
    {
        "name": "Success",
        "description": "",
        "children": [
            {
                "name": "BookingDetailsList",
                "description": "Booking details Collection",
                "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&#39;s contact info or your customer service team&#39;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&#39;t provide the value of this field, then you don&#39;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"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
]
Response Parameters
Error ErrorType
ErrorType
Success HotelBookingSearchRSSuccess
HotelBookingSearchRSSuccess
Response Sample
{
    "Success": {
        "BookingDetailsList": [
            {
                "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
                                }
                            ],
                            "MaxOccupancy": 2,
                            "RoomTypeID": 6950339,
                            "Currency": "USD",
                            "RatePlanName": "Double Standard Floor 19-30F (28-31sqm)",
                            "RatePlanID": "1494507509528725623",
                            "RoomName": "Queen Room"
                        }
                    ],
                    "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"
                        }
                    ],
                    "TotalPrice": 299.13,
                    "HotelName": "Cerulean Tower Tokyu Hotel"
                },
                "ClientReference": "v-test-2023-06-28",
                "BookingID": "1674000176857108480"
            }
        ]
    }
}
Response Sample
<HotelBookingSearchRS>
  <Success>
    <BookingDetailsList>
      <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.13</TotalPrice>
        <GuestList>
          <Room RoomNum="1">
            <GuestInfo>
              <Name First="vincent" Last="ye" />
              <IsAdult>true</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>
        <Hotel>
          <HotelID>512</HotelID>
          <HotelName>Cerulean Tower Tokyu Hotel</HotelName>
          <Destination CityCode="179900" />
          <TotalPrice>299.13</TotalPrice>
          <RatePlanList>
            <RatePlan>
              <RoomOccupancy RoomNum="1" AdultCount="2" ChildCount="0" />
              <RoomTypeID>6950339</RoomTypeID>
              <RoomName>Queen Room</RoomName>
              <RatePlanID>1494507509528725623</RatePlanID>
              <RatePlanName>Double Standard Floor 19-30F (28-31sqm)</RatePlanName>
              <BedType>2</BedType>
              <BreakfastType>1</BreakfastType>
              <MaxOccupancy>2</MaxOccupancy>
              <RoomStatus>1</RoomStatus>
              <Currency>USD</Currency>
              <TotalPrice>299.13</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.13</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>
    </BookingDetailsList>
  </Success>
</HotelBookingSearchRS>