Get Rates & Availability

(Full Rate)

Contents

1. GetAri V1 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).

GetAri - Multiple endpoint

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

(replace xxx with your API Key)


2. GetAri v1_RQ

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

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

<criteria from="2015-10-01" to="2015-10-01">

<property id="10779" room_id="5478296" rateplan_id="119326" type="inventory" />

<property id="1949542" room_id="5478687"/>

</criteria>

</request>

3. GetAri V1_Response

<result timestamp="1452216099647">

<properties item_count="2">

<property id="12123" date="2016-01-13">

<rates rateplan_id="24197" currency="THB">

<room room_id="72027" single_rate="500.0" double_rate="500.0" full_rate="0.0" extra_bed="0.0" closed="true" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="3047900" single_rate="300.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="3"/>

<room room_id="4909303" single_rate="3000.0" double_rate="3000.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="0"/>

<room room_id="4909304" single_rate="250.0" double_rate="250.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

</rates>

<rates rateplan_id="24202" currency="THB">

<room room_id="72027" single_rate="200.0" double_rate="400.0" full_rate="0.0" extra_bed="0.0" closed="true" cta="false" ctd="false" min_los="1" max_los="21" min_staythrough="2"/>

<room room_id="3047900" single_rate="200.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="3"/>

<room room_id="4909303" single_rate="300.0" double_rate="300.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="0"/>

<room room_id="4909304" single_rate="300.0" double_rate="450.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

</rates>

<inventories>

<room room_id="72027" allotment="18" guaranteed_allotment="2" allotment_used_regular="1" allotment_used_guaranteed="0" closed="false" cta="true" ctd="true"/>

<room room_id="3047900" allotment="10" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="2" closed="false" cta="false" ctd="false"/>

<room room_id="4909303" allotment="20" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="2" closed="false" cta="false" ctd="false"/>

<room room_id="4909304" allotment="10" guaranteed_allotment="0" allotment_used_regular="1" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

</inventories>

</property>

<property id="12123" date="2016-01-14">

<rates rateplan_id="24197" currency="THB">

<room room_id="72027" single_rate="500.0" double_rate="500.0" full_rate="0.0" extra_bed="0.0" closed="true" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="3047900" single_rate="300.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="4909303" single_rate="3000.0" double_rate="3000.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="4909304" single_rate="250.0" double_rate="250.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

</rates>

<rates rateplan_id="24202" currency="THB">

<room room_id="72027" single_rate="200.0" double_rate="400.0" full_rate="0.0" extra_bed="0.0" closed="true" cta="false" ctd="false" min_los="1" max_los="21" min_staythrough="2"/>

<room room_id="3047900" single_rate="200.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="4909303" single_rate="300.0" double_rate="300.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

<room room_id="4909304" single_rate="300.0" double_rate="450.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="0" min_staythrough="2"/>

</rates>

<inventories>

<room room_id="72027" allotment="15" guaranteed_allotment="5" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="true" ctd="true"/>

<room room_id="3047900" allotment="10" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

<room room_id="4909303" allotment="20" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

<room room_id="4909304" allotment="10" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

</inventories>

</property>

</properties>

/result>

<room room_id="3047900" single_rate="300.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

<room room_id="4909303" single_rate="3000.0" double_rate="3000.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

<room room_id="4909304" single_rate="250.0" double_rate="250.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

</rates>

<rates rateplan_id="24202" currency="THB">

<room room_id="72027" single_rate="200.0" double_rate="400.0" full_rate="0.0" extra_bed="0.0" closed="true" cta="false" ctd="false" min_los="1" max_los="21"/>

<room room_id="3047900" single_rate="200.0" double_rate="400.0" full_rate="500.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

<room room_id="4909303" single_rate="300.0" double_rate="300.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

<room room_id="4909304" single_rate="300.0" double_rate="450.0" full_rate="0.0" extra_bed="0.0" closed="false" cta="false" ctd="false" min_los="1" max_los="-1"/>

</rates>

<inventories>

<room room_id="72027" allotment="15" guaranteed_allotment="5" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="true" ctd="true"/>

<room room_id="3047900" allotment="10" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

<room room_id="4909303" allotment="20" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

<room room_id="4909304" allotment="10" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="false" ctd="false"/>

</inventories>

</property>

</properties>

/result>


4. GetAri v1_Schema

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

<xs:simpleType name="requesttype">

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

<xs:enumeration value="rate"/>

<xs:enumeration value="inventory"/>

<xs:enumeration value="both"/>

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="endpointtype">

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

<xs:enumeration value="2"/>

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="idType">

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

<xs:maxInclusive value="2147483647"/>

</xs:restriction>

</xs:simpleType>

<xs:element name="request">

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:simpleContent>

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

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

<xs:attribute type="idType" name="room_id" use="optional"/>

<xs:attribute type="idType" name="rateplan_id" use="optional"/>

<xs:attribute type="requesttype" name="type" use="optional"/>

</xs:extension>

</xs:simpleContent>

</xs:complexType>

</xs:element>

</xs:sequence>

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

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

</xs:complexType>

</xs:element>

</xs:sequence>

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

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

</xs:complexType>

</xs:element>



</xs:schema>

4.1 GetAriV1 Schema Response

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

<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->

<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" minOccurs="0" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:sequence>

<xs:element name="prices">

<xs:complexType>

<xs:sequence>

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

<xs:complexType>

<xs:attribute name="price" type="xs:decimal" use="required" />

<xs:attribute name="person" type="xs:unsignedByte" use="required" />

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

<xs:attribute name="min_staythrough" type="xs:int" use="required" />

<xs:attribute name="max_los" type="xs:int" use="required" />

<xs:attribute name="min_los" type="xs:int" use="required" />

<xs:attribute name="ctd" type="xs:boolean" use="required" />

<xs:attribute name="cta" type="xs:boolean" use="required" />

<xs:attribute name="closed" type="xs:boolean" use="required" />

<xs:attribute name="extra_bed" type="xs:decimal" />

<xs:attribute name="room_id" type="xs:string" use="required" />

</xs:complexType>

</xs:element>

</xs:sequence>

<xs:attribute name="currency" type="xs:string" use="required" />

<xs:attribute name="rateplan_id" type="xs:string" use="required" />

</xs:complexType>

</xs:element>

<xs:element name="inventories">

<xs:complexType>

<xs:sequence>

<xs:element name="room">

<xs:complexType>

<xs:attribute name="ctd" type="xs:boolean" use="required" />

<xs:attribute name="cta" type="xs:boolean" use="required" />

<xs:attribute name="closed" type="xs:boolean" use="required" />

<xs:attribute name="allotment_used_guaranteed" type="xs:int" use="required" />

<xs:attribute name="allotment_used_regular" type="xs:int" use="required" />

<xs:attribute name="guaranteed_allotment" type="xs:int" use="required" />

<xs:attribute name="allotment" type="xs:int" use="required" />

<xs:attribute name="room_id" type="xs:string" use="required" />

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

<xs:attribute name="date" type="xs:string" use="required" />

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

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

</xs:complexType>

</xs:element>

<xs:attribute name="timestamp" type="xs:unsignedLong" use="required" />

</xs:complexType>

</xs:element>

</xs:schema>

</xs:schema>