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.

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:

  • If the deadline is today or in the future, cancelling the reservation after the deadline will result in a penalty equal to the cost of the first priced night.
  • If the deadline is already in the past (e.g., yesterday or earlier) when the cancellation terms are received, the reservation is considered non-refundable by default, and a cancellation penalty equal to 100% of the total reservation cost (full charge) applies.

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.