When you run either a hotels / hoteldetail request for content-api, you’ll find hotels in the response that inform different roomstay in the same room node. The purpose of this roomstay tags is to provide information in the case that the room has one or more different “stays” where the guests can sleep.
In case the roomStays element appears within a room node, it’s necessary to read the whole element to understand the number of roomStays available in the room and also get the information regarding the facilities available in each of the “stays”.
The facilities for a specific roomStay will indicate what the guest will find in that particular “stay”. By reading the facilities within the roomstay, you’ll be able to inform that the “stay” has just a Double King bed or if it has a sofa bed. There will be cases when the same roomstay offers two different facilities, eg: a roomstay can offer a Double bed by default or 2 single beds as an alternative distribution.
In order to interpret each one of the roomstays, you’ll need to pay attention to “stayType”, “roomStayFacilities” and “facilityGroupCode” for each of the roomstayFacilities
<room roomCode="DBL.EJ" isParentRoom="false" minPax="1" maxPax="5" maxAdults="4" maxChildren="4" minAdults="1" description="DOUBLE EXECUTIVE">
<type code="DBL">
<description>DOUBLE</description>
</type>
<characteristic code="EJ">
<description>EXECUTIVE</description>
</characteristic>
...
<roomStays>
<roomStay stayType="BED" order="1" description="Bed room">
<roomStayFacilities>
<roomStayFacility facilityCode="150" facilityGroupCode="61" number="1">
<description>Double bed 131-150 width</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
</roomStays>
</room>
In this case roomStayFacilities have different facilitygroupcode (GroupCode 61 and 62), so the logic is an OR for those 2 roomStayFacilities.
<room roomCode="DBT.ST" isParentRoom="false" minPax="1" maxPax="5" maxAdults="4" maxChildren="4" minAdults="1" description="Double or Twin STANDARD">
<type code="DBT">
<description>Double or Twin</description>
</type>
<characteristic code="ST">
<description>STANDARD</description>
</characteristic>
....
<roomStays>
<roomStay stayType="BED" order="1" description="Bed room">
<roomStayFacilities>
<roomStayFacility facilityCode="1" facilityGroupCode="61" number="2">
<description>Single bed 90-130 width</description>
</roomStayFacility>
<roomStayFacility facilityCode="150" facilityGroupCode="62" number="1">
<description>Double bed 131-150 width</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
</roomStays>
</room>
In this case both roomStayFacilities are the default room occupancy (GroupCode 61), so the logic is an AND for the 2 roomStayFacilities.
<room roomCode="QUA.ST" isParentRoom="false" minPax="1" maxPax="6" maxAdults="4" maxChildren="3" minAdults="1" description="QUADRUPLE STANDARD">
<type code="QUA">
<description>QUADRUPLE</description>
</type>
<characteristic code="ST">
<description>STANDARD</description>
</characteristic>
...
<roomStays>
<roomStay stayType="BED" order="1" description="Bed room">
<roomStayFacilities>
<roomStayFacility facilityCode="150" facilityGroupCode="61" number="1">
<description>Double bed 131-150 width</description>
</roomStayFacility>
<roomStayFacility facilityCode="294" facilityGroupCode="61" number="1">
<description>Queen-size bed 150-154 width</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
</roomStays>
In case there’s more than one roomStay the logic for the different roomStays is an AND. In this example, there is roomStay 1 AND roomStay 2 AND roomStay3 . See below:
<room roomCode="APT.B2-C6" isParentRoom="false" minPax="1" maxPax="10" maxAdults="10" maxChildren="6" minAdults="1" description="APARTMENT CAPACITY 6 TWO BEDROOMS">
<type code="APT">
<description>APARTMENT</description>
</type>
<characteristic code="B2-C6">
<description>CAPACITY 6 TWO BEDROOMS</description>
</characteristic>
...
<roomStays>
<roomStay stayType="BED" order="1" description="Bed room">
<roomStayFacilities>
<roomStayFacility facilityCode="150" facilityGroupCode="61" number="1">
<description>Double bed 131-150 width</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
<roomStay stayType="BED" order="2" description="Bed room">
<roomStayFacilities>
<roomStayFacility facilityCode="1" facilityGroupCode="61" number="2">
<description>Single bed 90-130 width</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
<roomStay stayType="LIV" order="1">
<roomStayFacilities>
<roomStayFacility facilityCode="284" facilityGroupCode="61" number="2">
<description>Sofa bed</description>
</roomStayFacility>
</roomStayFacilities>
</roomStay>
</roomStays>