Get Booking List V1.

The page will soon be discontinued. Please refer to this updated page instead - Click Here

Contents

1. GetBookingList V1 EndPoint

agoda offers two types of endpoints:

NOTE: please note that if you wish to use the single endpoint for your request, the Type attribute will be mandatory in all the requests you will send to Agoda (this is to allow us to identify the call type).

 

GetBookingList - Multiple endpoint

 

GetBookingList - Single Endpoint (Please note: 'type=3' attribute is mandatory when using Single endpoint)

(replace xxx with your API Key)

2. GetBookingList V1 RQ

<?xml version="1.0" encoding="UTF-8"?>

<request timestamp="1436931804" type="2">

   <criteria from="2015-09-01T00:00:00+07:00" to="2015-09-16T00:00:00+07:00" status="AmendBooking">

  <property id="84626"/>

 <property id="48534"/>

    <property id="10"/>

    <property id="9250"/> <!--valid property_id but no data-->

    <property id="925011"/> <!--invalid property_id-->

   </criteria>     

</request>    


 <!-- 

 Property = 5

 LookBack = 90 Days

 Now - From <= 90 Days

-->


<!-- 

from & to is specified with an offset from the UTC time by adding a positive or negative time behind the time - like this:

-->

3. GetBookingList V1 Response

<result timestamp="1443579664533">

    <properties count="5">

        <property id="84626">

            <bookings>

                <booking booking_id="4335173" booking_date="2015-09-15T12:39:00+07:00" last_action="2015-09-15T12:47:33+07:00" arrival="2015-10-04" departure="2015-10-05" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4335868" booking_date="2015-09-16T15:44:00+07:00" last_action="2015-09-16T15:56:47+07:00" arrival="2015-10-10" departure="2015-10-12" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4332256" booking_date="2015-09-03T17:25:00+07:00" last_action="2015-09-03T19:14:57+07:00" arrival="2015-11-12" departure="2015-11-13" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4335525" booking_date="2015-09-16T11:47:00+07:00" last_action="2015-09-16T12:10:50+07:00" arrival="2015-10-14" departure="2015-10-16" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4335555" booking_date="2015-09-16T12:10:00+07:00" last_action="2015-09-16T12:14:34+07:00" arrival="2015-10-12" departure="2015-10-14" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4336026" booking_date="2015-09-16T17:22:00+07:00" last_action="2015-09-16T17:36:07+07:00" arrival="2015-10-16" departure="2015-10-17" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4187685" booking_date="2015-05-19T16:18:00+07:00" last_action="2015-09-02T14:59:07+07:00" arrival="2015-12-24" departure="2015-12-26" status="AmendBooking" acknowledge="0"/>

                <booking booking_id="4332257" booking_date="2015-09-03T17:25:00+07:00" last_action="2015-09-03T19:27:58+07:00" arrival="2015-11-12" departure="2015-11-13" status="AmendBooking" acknowledge="0"/>

            </bookings>

        </property>

        <property id="48534">

            <bookings>

                <booking booking_id="4335927" booking_date="2015-09-16T16:25:00+07:00" last_action="2015-09-16T17:22:53+07:00" arrival="2015-10-16" departure="2015-10-17" status="AmendBooking" acknowledge="0"/>

            </bookings>

        </property>

        <property id="10">

            <bookings>

                <booking booking_id="4333783" booking_date="2015-09-09T10:47:00+07:00" last_action="2015-09-09T14:39:01+07:00" arrival="2015-11-08" departure="2015-11-10" status="AmendBooking" acknowledge="0"/>

            </bookings>

        </property>

        <property id="9250">

            <bookings></bookings>

        </property>

        <property id="925011">

            <bookings></bookings>

        </property>

    </properties>

</result>



<!-- 

booking_date & last_action to is specified with an offset from the UTC time by adding a positive or negative time behind the time - like this:

-->

4. GetBookingList V1 Schema

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"

           xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="request" type="requestType"/>

  <xs:simpleType name="endpointtype">

        <xs:restriction base="xs:int">

            <xs:enumeration value="3"/>

        </xs:restriction>

    </xs:simpleType>

    <xs:complexType name="requestType">

        <xs:sequence>

            <xs:element type="criteriaType" name="criteria" minOccurs="1" maxOccurs="1"/>

        </xs:sequence>

        <xs:attribute type="xs:long" name="timestamp"/>

  <xs:attribute type="endpointtype" name="type"/>

    </xs:complexType>

    <xs:complexType name="propertyType">

        <xs:simpleContent>

            <xs:extension base="xs:string">

                <xs:attribute type="idType" name="id" use="required"/>

            </xs:extension>

        </xs:simpleContent>

    </xs:complexType>

    <xs:complexType name="criteriaType">

        <xs:sequence>

            <xs:element type="propertyType" name="property" minOccurs="1" maxOccurs="unbounded"/>

        </xs:sequence>

        <xs:attribute type="dateTimeWithTimezone" name="from" use="required"/>

        <xs:attribute type="dateTimeWithTimezone" name="to" use="required"/>

        <xs:attribute type="acknowledgeType" name="status"/>

    </xs:complexType>

    <xs:simpleType name="acknowledgeType">

        <xs:restriction base="xs:string">

            <xs:enumeration value="ConfirmBooking"/>

            <xs:enumeration value="CancelBooking"/>

            <xs:enumeration value="AmendBooking"/>

        </xs:restriction>

    </xs:simpleType>

    <xs:simpleType name="dateTimeWithTimezone">

        <xs:restriction base="xs:dateTime">

            <xs:pattern value=".+T.+(Z|[+-].+)"/>

        </xs:restriction>

    </xs:simpleType>

    <xs:simpleType name="idType">

        <xs:restriction base="xs:unsignedLong">

            <xs:maxInclusive value="2147483647"/>

        </xs:restriction>

    </xs:simpleType>

</xs:schema>

4.1 GetBookingList V1 Schema Response

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="result">

        <xs:complexType>

            <xs:sequence>

                <xs:element name="errors" minOccurs="0" maxOccurs="1">

                    <xs:complexType>

                        <xs:sequence>

                            <xs:element name="error" minOccurs="1" maxOccurs="unbounded">

                                <xs:complexType>

                                    <xs:simpleContent>

                                        <xs:extension base="xs:string">

                                            <xs:attribute type="xs:short" name="code"/>

                                            <xs:attribute type="xs:string" name="description"/>

                                        </xs:extension>

                                    </xs:simpleContent>

                                </xs:complexType>

                            </xs:element>

                        </xs:sequence>

                    </xs:complexType>

                </xs:element>

                <xs:element name="properties" minOccurs="0" maxOccurs="1">

                    <xs:complexType>

                        <xs:sequence>

                            <xs:element name="property" maxOccurs="unbounded" minOccurs="0">

                                <xs:complexType>

                                    <xs:sequence>

                                        <xs:element name="bookings">

                                            <xs:complexType>

                                                <xs:sequence>

                                                    <xs:element name="booking" maxOccurs="unbounded" minOccurs="0">

                                                        <xs:complexType>

                                                            <xs:simpleContent>

                                                                <xs:extension base="xs:string">

                                                                    <xs:attribute type="xs:unsignedLong" name="booking_id"/>

                                                                    <xs:attribute type="dateTimeWithTimezone" name="booking_date"/>

                                                                    <xs:attribute type="dateTimeWithTimezone" name="last_action"/>

                                                                    <xs:attribute type="xs:date" name="arrival"/>

                                                                    <xs:attribute type="xs:date" name="departure"/>

                                                                    <xs:attribute type="xs:string" name="status"/>

                                                                    <xs:attribute type="xs:byte" name="acknowledge"/>

                                                                </xs:extension>

                                                            </xs:simpleContent>

                                                        </xs:complexType>

                                                    </xs:element>

                                                </xs:sequence>

                                            </xs:complexType>

                                        </xs:element>

                                    </xs:sequence>

                                    <xs:attribute type="xs:unsignedLong" name="id"/>

                                </xs:complexType>

                            </xs:element>

                        </xs:sequence>

                        <xs:attribute type="xs:int" name="count"/>

                    </xs:complexType>

                </xs:element>

            </xs:sequence>

            <xs:attribute type="xs:long" name="timestamp"/>

        </xs:complexType>

    </xs:element>

    <xs:simpleType name="dateTimeWithTimezone">

        <xs:restriction base="xs:dateTime">

            <xs:pattern value=".+T.+(Z|[+-].+)"/>

        </xs:restriction>

    </xs:simpleType>

</xs:schema>