The get_deadline method allow the client system to retrieve the deadline policy of the selected agreement. The response reports the deadline date, value and policies. The (type) attribute has to be set to get_deadline. Please note that the timezone to be considered is CET/CEST.
Here is an example of a get_deadline:
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<header>
<actor>test</actor>
<user>test</user>
<password>test</password>
<version>1.6.1</version>
<timestamp>20030423170000</timestamp>
</header>
<query type="get_deadline" product="hotel">
<availability id="XXXXXXXXXXX"></availability>
<hotel id="XXXXXXXXXXX"></hotel>
<agreement code="XXXXXXXXXXXXXx"></agreement>
</query>
</envelope>
This get_deadline query contains all the available fields: the type attribute is set to get_deadline. Let's explore in deeper detail the meaning of every field.
The response to a get_deadline query has its type attribute set to get_deadline and follows that form:
<?xml version="1.0" encoding="UTF-8"?>
<response type="get_deadline" product="hotel">
<availability id="12312312"/>
<agreement code="XXXXXXXXXXXXXx"/>
<deadline date="2014-11-04 18:00:00"/>
<policies>
<policy from="2014-11-05 18:00:00" percentage="25" />
</policies>
<remarks>
<remark code="F" text="From 2014-11-05 18:00 cancellation fee is 1 Nights."/>
<remark code="N" text="No-show fee is 1 Nights."/>
</remarks>
</response>
The "deadline" node is always populated, while the "policies" and "remarks" nodes may be empty.
The "percentage" value in the cancellation policies refers to the total reservation cost. For example, if the booking total is €300.00 and the policy percentage is 80, cancelling the booking after the specified date will result in a cancellation fee of €240.00.
When "remarks" are provided, they must always be displayed to the client, as some hotels prefer to communicate their cancellation terms through a textual description.
If both the "policies" and "remarks" nodes are empty, the following default cancellation rules apply:
This is an example of get_deadline response you can encounter:
<?xml version="1.0" encoding="UTF-8"?>
<envelope>
<header>
<version port="20000" host="epycs.netstorming.net">1.6.0</version>
<timestamp>20160614180130</timestamp>
</header>
<response type="get_deadline" product="hotel">
<availability id="15964364061"/>
<deadline date="2016-08-04 12:00:00" value="2016-08-04 12:00:00"/>
<policies>
<policy from="2016-08-05 12:00:00" percentage="100"/>
</policies>
<remarks/>
</response>
</envelope>
You have to interpret this response as follows:
Please note: the cancellation policies you get using this method are only a good approximation of the actual ones and could differ from the final ones. In order to get the final cancellation policies you have to use the evaluate method.