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.

Query
  • Availability
    • Id of availability search performed.The availability id has to be passed in the id attribute. Availability id are unique.
  • Hotel
    • Id of the hotel. The hotel id has to be passed in the id attribute.
  • Agreement
    • Id of the agreement.The agreement has to be passed in the code attribute.

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>
Response
  • Availability id
    • The availability id received from the request.
  • Agreement code
    • The agreement code received from the request.
  • Deadline
    • Report the date of the deadline, available in the date attribute.
  • Policies
    • If available, system will return deadline policies.
  • Policy
    • Contains the following tag:
      • Date The starting date of the policy
      • Percentage The price percentage of the policy (that must be calculated from the price of the selected agreement)
  • Remarks
    • If setted, contains a list of coded remarks.
  • Remark
    • Coded remark. The code field contains the remark code, the text field, if used, contains the free text of the remark.

While the "deadline" node is always filled, the "policies" and "remarks" nodes could be empty. The "percentage" of the policies is related to the reservation cost. For example, if the booking total is €300.00 and the policy percentage's value is 80, cancelling the booking after that date, the client will have to pay €240.00. When the remarks are present, they must always be shown to the client, because sometimes the hotel prefers to handle its cancellation terms using a text message. If both the policies and remarks nodes are empty, the client will have to pay only the first priced night, if he cancels the reservation after the deadline's date.

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:

  • before 2016-08-04 12:00:00, cancellation free of charge;
  • from 2016-08-04 12:00:00 (deadline date) to 2016-08-05 12:00:00 (first policy tag) cancellation 1 night fee (as there's no policy specified)
  • from 2016-08-05 12:00:00 (first policy tag) cancellation fee 100% of booking amount

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.