Get Booking List V2.

Contents

1. GetBookingList V2 EndPoint

agoda offers two types of endpoints:

  • Single endpoint : One Endpoint for all agoda calls,

  • Multiple endpoint : One Endpoint Per Call (each endpoint is configured unique to that call type).

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=9' attribute is mandatory when using Single endpoint)

(replace xxx with your API Key)

2. GetBookingList V2 RQ

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

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

<criteria from="2017-04-10T15:00:00+07:00" to="2017-04-10T16:00:00+07:00">

</criteria>

</request>


3. GetBookingList V2 Response

<result timestamp="1491896697506">

<properties count="6">

<property id="2261100">

<bookings>

<booking booking_id="6724245" booking_date="2017-04-03T16:32:00+07:00" last_action="2017-04-10T15:32:46+07:00" arrival="2017-04-24" departure="2017-04-25" status="ConfirmBooking" acknowledge="0"/>

<booking booking_id="50168501" booking_date="2017-04-03T17:48:00+07:00" last_action="2017-04-10T15:48:36+07:00" arrival="2017-04-13" departure="2017-04-14" status="ConfirmBooking" acknowledge="0"/>

<booking booking_id="50168507" booking_date="2017-04-03T17:59:00+07:00" last_action="2017-04-10T15:59:17+07:00" arrival="2017-04-13" departure="2017-04-14" status="ConfirmBooking" acknowledge="0"/>

</bookings>

</property>

<property id="6001284">

<bookings>

<booking booking_id="6718391" booking_date="2017-04-02T01:33:00+07:00" last_action="2017-04-10T15:33:15+07:00" arrival="2017-05-02" departure="2017-05-03" status="ConfirmBooking" acknowledge="0"/>

<booking booking_id="6718406" booking_date="2017-04-02T01:33:00+07:00" last_action="2017-04-10T15:33:15+07:00" arrival="2017-05-02" departure="2017-05-03" status="ConfirmBooking" acknowledge="0"/>

<booking booking_id="6718393" booking_date="2017-04-02T01:33:00+07:00" last_action="2017-04-10T01:33:25+07:00" arrival="2017-05-02" departure="2017-05-03" status="ConfirmBooking" acknowledge="0"/>

</bookings>

</property>

</properties>

</result>


4. GetBookingList V2 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="9"/>

</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="criteriaType">

<xs:simpleContent>

<xs:extension base="whiteSpace">

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

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

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

</xs:extension>

</xs:simpleContent>

</xs:complexType>

<xs:simpleType name="whiteSpace">

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

<xs:pattern value="[\s\t\n\r]*"/>

</xs:restriction>

</xs:simpleType>

<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 V2 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>