Here is a recap about the booking flow using the EVALUATE method.

  1. you perform an initial availability search. You should collect the search_number you get with the response.

REQUEST

<envelope>
    <header>
        <actor>xxx</actor>
        <user>xxx</user>
        <password>xxx</password>
        <version>1.6.3</version>
        <timestamp>20191114140000</timestamp>
    </header>
    <query type="availability" product="hotel">
        <nationality>US</nationality>
        <filters>
            <filter>AVAILONLY</filter>
            <filter>BESTARRANGMENT</filter>
        </filters>
        <checkin date="2020-01-05"/>
        <checkout date="2020-01-08"/>
        <hotel id="5936"/>
        <hotel id="126576"/>
        <details>
            <room type="sgl" required="1"/>
        </details>
    </query>
</envelope>

RESPONSE

<envelope>
    <header>
        <version>1.6.3</version>
        <timestamp>20191114152551</timestamp>
    </header>
    <response type="availability" product="hotel">
        <search number="100043251493109" time="1.13" />
        <nights number="3" />
        <checkin date="2020-01-05" />
        <checkout date="2020-01-08" />
        <hotels total="2">
            <hotel code="5936" name="CONRAD NEW YORK MIDTOWN" stars="5" location="01" address="151 West 54th Street, 10019" promo="false" city="NYC">
                [...]
                <agreement id="0xa9.5936.10160.RO.X.MjMzZTg5.DX-GR.RO.NOR.OWRhYWI2.ROO" available="true" room_basis="RO" meal_basis="X" ctype="10160" c_type="10160" room_type="Deluxe Guest Room" is_dynamic="false" currency="EUR" deadline="2019-11-13" total="912.00" total_gross="912.00" original_total="912.00" special="false">
                    <remarks>
                        <remark text="ROOM ONLY"/>
                    </remarks>
                    <room type="sgl" required="1" occupancy="1">
                        <price from="2020-01-05" to="2020-01-06">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                        <price from="2020-01-06" to="2020-01-07">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                        <price from="2020-01-07" to="2020-01-08">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                    </room>
                </agreement>
                [...]
            </hotel>
        </hotels>
    </response>
</envelope>
  1. once you have chosen one of the obtained contracts, you can proceed with the evaluate. It is similar to a "normal" search aimed at the single hotel. You just have to add a tag: search. Here you have to specify the following information:
    • the search number of the availability search you are referring to
    • the agreement you have chosen from that availability
    • the price of the chosen agreement

REQUEST

<envelope>
    <header>
        <actor>xxx</actor>
        <user>xxx</user>
        <password>xxx</password>
        <version>1.6.3</version>
        <timestamp>20191114140000</timestamp>
    </header>
    <query type="availability" product="hotel">
                <search number="100043251493109" agreement="0xa9.5936.10160.RO.X.MjMzZTg5.DX-GR.RO.NOR.OWRhYWI2.ROO" price="912.00"/>
        <nationality>US</nationality>
        <filters>
            <filter>AVAILONLY</filter>
            <filter>BESTARRANGMENT</filter>
        </filters>
        <checkin date="2020-01-05"/>
        <checkout date="2020-01-08"/>
        <hotel id="5936"/>
        <details>
            <room type="sgl" required="1"/>
        </details>
    </query>
</envelope>

RESPONSE

<envelope>
    <header>
        <version>1.6.3</version>
        <timestamp>20191114152806</timestamp>
    </header>
    <response type="availability" product="hotel">
        <search number="100043251552044" time="2.84" />
        <nights number="3" />
        <evaluate>
            <result code="ok" option_blocked="true"/>
        </evaluate>
        <checkin date="2020-01-05" />
        <checkout date="2020-01-08" />
        <hotels total="1">
            <hotel code="5936" name="CONRAD NEW YORK MIDTOWN" stars="5" location="01" address="151 West 54th Street, 10019" promo="false" city="NYC">
                <agreement id="0xa9.5936.10160.RO.X.MjMzZTg5.DX-GR.RO.NOR.OWRhYWI2.ROO" available="true" room_basis="RO" meal_basis="X" ctype="10160" c_type="10160" room_type="Deluxe Guest Room" is_dynamic="false" currency="EUR" deadline="2019-12-29" total="912.00" total_gross="912.00" original_total="912.00" special="false">
                    <deadline date="2019-12-29 18:00:00" value="2019-12-29 18:00:00"/>
                    <policies>
                        <policy from="2019-12-29 18:00:00" percentage="96.96" />
                    </policies>
                    <deadline_remarks>
                        <remark text="Car park YES (with additional debit notes) 65.00 USD Per unit/night." />
                    </deadline_remarks>
                    <remarks>
                        <remark text="Car park YES (with additional debit notes) 65.00 USD Per unit/night."/>
                        <remark text="ROOM ONLY"/>
                    </remarks>
                    <room type="sgl" required="1" occupancy="1">
                        <price from="2020-01-05" to="2020-01-06">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                        <price from="2020-01-06" to="2020-01-07">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                        <price from="2020-01-07" to="2020-01-08">
                            <roomprice nett="304.00" gross="304.00"/>
                        </price>
                    </room>
                </agreement>
            </hotel>
        </hotels>
    </response>
</envelope>

You will receive the evaluate tag within the response. Please notice you will also get the actual cancellation policies already in this stage.

  1. When you send the book request, please pay attention to the search number: in this message you have to communicate the one you retrieved with the evaluate response (not with the initial availability).

REQUEST

<envelope>  
    <header>
        <actor>xxx</actor>
        <user>xxx</user>
        <password>xxx</password>
        <version>1.6.3</version>
        <timestamp>20191114140000</timestamp>
    </header>
    <query type="book" product="hotel">  
        <search number="100043251552044"/>  
        <synchronous value="false"/>  
        <nationality>US</nationality>  
        <checkin date="2020-01-05"/>
        <checkout date="2020-01-08"/> 
        <city code="NYC"/>  
    <availonly value="true" />  
        <hotel code="5936" agreement="0xa9.5936.10160.RO.X.MjMzZTg5.DX-GR.RO.NOR.OWRhYWI2.ROO"/>  
        <reference code="BOOK2019-12345"/>  
        <responses>  
          <to url="http://www.yoursite.com/yourprogram.cgi"/>  
          <to url="mailto://your.address@yoursite.com"/>  
        </responses>  
        <details>  
            <room type="sgl" extrabed="false" cot="false">  
                <pax leader="true" title="MR" name="MARIO" surname="ROSSI"/>  
            </room>  
        </details>  
    </query>  
</envelope>

So, in order to summarize:

  1. Fist Availability search: our response will include the "search number" (ie. 1010101010)
  2. Pre-book/Evaluate step: you have to send a new search and include previous "search number" (i.e. 1010101010) in your query - our evaluate response will return a new search number (i.e. 949494) along with the agreement you have to use for the booking stage
  3. Book request: you have to include previous "search number" (i.e. 949494) in your request, the one retrieved via evaluate call along with the evaluated agreement.