Hotel Trader supports 4 types of length of stay restrictions:
- Minimum length of stay through
- Maximum length of stay through
- Minimum length of stay (arrival-based)
- Maximum length of stay (arrival-based)
With arrival-based LOS restrictions, when someone attempts a reservation on your system, you need to verify whether the LOS of the reservation meets the LOS restrictions, only for the check-in date.
With stay-through-based LOS restrictions, when someone attempts a reservation on your system, you need to verify whether the LOS of the reservation meets the LOS restrictions, for each stay date between the check-in and the check-out date, excluding the check-out date.
Message Structures
These attributes are in the <LengthsOfStay> node which previously supported arrival-based LOS restrictions. You receive all four LOS restrictions in a single XML message, as shown below:
<LengthsOfStay>
<LengthOfStay Time="2" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="21" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="1" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="21" MinMaxMessageType="SetForwardMaxStay"/>
</LengthsOfStay>
Keep in mind that the parent <LengthsOfStay> node may contain either one, two, three, or all four LOS restrictions. Therefore, the following snippets are perfectly valid:
Example 1
<LengthsOfStay>
<LengthOfStay Time="4" MinMaxMessageType="SetMaxLOS"/>
</LengthsOfStay>
Example 2
<LengthsOfStay>
<LengthOfStay Time="3" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="2" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="25" MinMaxMessageType="SetForwardMaxStay"/>
</LengthsOfStay>
More Examples
Let's assume the following restrictions are sent to the client system for the below dates:
Note: Each XML tab in the code snippet below corresponds to a different date, make sure you see the restrictions in the examples below!
2023-01-01
<LengthOfStay Time="2" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-02
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="3" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-03
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="1" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-04
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-05
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="1" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-06
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
2023-01-07
<LengthOfStay Time="0" MinMaxMessageType="SetMinLOS"/>
<LengthOfStay Time="28" MinMaxMessageType="SetMaxLOS"/>
<LengthOfStay Time="0" MinMaxMessageType="SetForwardMinStay"/>
<LengthOfStay Time="28" MinMaxMessageType="SetForwardMaxStay"/>
Given the above restrictions, see below reservations that will and will not be accepted:
Check-In Date | Check-Out Date | Booking Allowed? | Explanation |
---|---|---|---|
2023-01-01 | 2023-01-02 | No | MinLOS (arrival-based) restriction is not met for the check-in date. |
2023-01-01 | 2023-01-03 | No | MinLOS stay-through restriction is not met for 2023-01-02. |
2023-01-03 | 2023-01-04 | Yes | - |
2023-01-03 | 2023-01-05 | No | MaxLOS (arrival-based) restriction is not met for the check-in date. |
2023-01-04 | 2023-01-05 | Yes | - |
2023-01-04 | 2023-01-06 | No | MaxLOS stay-through restriction is not met for 2023-01-05. |
2023-01-05 | 2023-01-06 | Yes | - |
2023-01-05 | 2023-01-07 | No | MaxLOS stay-through restriction is not met for 2023-01-05. |