Response Example :
Main":{"Error":{"Code":129,"Message":"CannotParseMaxHotelsAttribute"},
"DebugError":{"Incident":0,"TimeStamp":"2025-09-28 09:00:13",
"Message":"Cannot parse 'MaxHotels' Attribute in 'Root/Main'"}
What it means :
The MaxHotels attribute value is invalid or missing and cannot be parsed.
About MaxHotels :
This parameter represents the number of hotel IDs that the client wants to receive in the search response.
It should be used when searching by destination to limit or control the amount of returned hotels.
Common reasons :
MaxHotelsattribute is empty.Value is 0 (must be greater than 0).
Value contains letters or other incorrect characters
Resolution / How to fix :
Add the
MaxHotelsattribute inside<Main>and ensure it contains a valid integer greater than 0.Use only numeric characters—no letters, symbols, or spaces.
✅ Example of a correct request :
<Root>
<Header debug="1">
<Agency></Agency>
<User></User>
<Password></Password>
<Operation>HOTEL_SEARCH_REQUEST</Operation>
<OperationType>Request</OperationType>
</Header>
<Main Version="2.4" ResponseFormat="JSON" MaxHotels="150">
<SortOrder>1</SortOrder>
<FilterPriceMin>0</FilterPriceMin>
<Nationality>US</Nationality>
<FilterPriceMax>10000</FilterPriceMax>
<MaximumWaitTime>20</MaximumWaitTime>
<MaxResponses>10000</MaxResponses>
<FilterRoomBasises>
<FilterRoomBasis></FilterRoomBasis>
</FilterRoomBasises>
<HotelName></HotelName>
<Apartments>false</Apartments>
<CityCode>75</CityCode>
<ArrivalDate>2025-11-28</ArrivalDate>
<Nights>3</Nights>
<Rooms>
<Room Adults="2" RoomCount="1" ChildCount="0"></Room>
</Rooms>
</Main>
</Root>