Set Rates & Availability  

(Multi Occupancy)

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

Contents

1. SetAri v2 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).

 

SetAri - Multiple endpoint

 SetAri - Single endpoint (Please note: 'type=10' attribute is mandatory when using Single endpoint)

2. SetAri v2 Request

2.1 SetARI BasicMode Default Rate

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

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

  <criteria property_id="1949542">

  <inventory>

   <update room_id="5478687">

    <date_range from="2018-06-01" to="2018-06-30">

     <dow>1</dow>

     <dow>2</dow>

     <dow>3</dow>

     <dow>4</dow>

     <dow>5</dow>

     <dow>6</dow>

     <dow>7</dow>

    </date_range>

    <allotment>9</allotment>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

    </restrictions>

   </update>

  </inventory>

  <rate>

   <update room_id="6577825" rateplan_id="25077">

    <date_range from="2019-06-01" to="2019-06-30"/>

    <prices currency="THB">

     <normal default="2000.0"/>

     <extra_bed>100.0</extra_bed>

    </prices>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

     <los>

      <min>1</min>

      <max>30</max>

     </los>

     <advancepurchase>

       <min>15</min>

       <max>30</max>

     </advancepurchase>

     <staythrough>

      <min>1</min>

     </staythrough>

    </restrictions>

   </update>

  </rate>

 </criteria>

</request>

2.2 SetARI BasicMode Custom Rates.xml 

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

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

  <criteria property_id="1949542">

  <inventory>

   <update room_id="5478687">

    <date_range from="2018-06-01" to="2018-06-30">

     <dow>1</dow>

     <dow>2</dow>

     <dow>3</dow>

     <dow>4</dow>

     <dow>5</dow>

     <dow>6</dow>

     <dow>7</dow>

    </date_range>

    <allotment>9</allotment>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

    </restrictions>

   </update>

  </inventory>

  <rate>

   <update room_id="5478687" rateplan_id="119017">

    <date_range from="2018-06-01" to="2018-06-30">

     <dow>6</dow>

    </date_range>

    <prices currency="THB">

     <normal>

      <occupancy person="1" price="200.0"/>

      <occupancy person="2" price="400.0"/>

      <occupancy person="3" price="600.0"/>

      <occupancy person="4" price="800.0"/>

      <occupancy person="5" price="1000.0"/>

     </normal>

     <extra_bed>200.0</extra_bed>

    </prices>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

     <los>

      <min>1</min>

      <max>30</max>

     </los>

   <advancepurchase>

       <min>15</min>

       <max>30</max>

     </advancepurchase>

     <staythrough>

      <min>1</min>

     </staythrough>

    </restrictions>

   </update>

  </rate>

 </criteria>

</request>

2.3 SetARI DeviationMode Amount

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

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

  <criteria property_id="1949542">

  <inventory>

   <update room_id="5478687">

    <date_range from="2018-06-01" to="2018-06-30">

     <dow>1</dow>

     <dow>2</dow>

     <dow>3</dow>

     <dow>4</dow>

     <dow>5</dow>

     <dow>6</dow>

     <dow>7</dow>

    </date_range>

    <allotment>9</allotment>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

    </restrictions>

   </update>

  </inventory>

  <rate>

   <update room_id="6577825" rateplan_id="25077">

    <date_range from="2019-06-01" to="2019-06-30"/>

    <prices currency="THB">

     <deviation base_price="1000.0">

      <occupancy person="1" amount="0.0"/>

      <occupancy person="2" amount="100.0"/>

      <occupancy person="3" amount="200.0"/>

      <occupancy person="4" amount="300.0"/>

     </deviation>

     <extra_bed>100.0</extra_bed>

    </prices>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

     <los>

      <min>1</min>

      <max>30</max>

     </los>

     <advancepurchase>

       <min>15</min>

       <max>30</max>

     </advancepurchase>

     <staythrough>

      <min>1</min>

     </staythrough>

    </restrictions>

   </update>

  </rate>

 </criteria>

</request>

2.4 SetARI_DeviationMode_Percentage

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

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

  <criteria property_id="1949542">

  <inventory>

   <update room_id="5478687">

    <date_range from="2018-06-01" to="2018-06-30">

     <dow>1</dow>

     <dow>2</dow>

     <dow>3</dow>

     <dow>4</dow>

     <dow>5</dow>

     <dow>6</dow>

     <dow>7</dow>

    </date_range>

    <allotment>9</allotment>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

    </restrictions>

   </update>

  </inventory>

  <rate>

   <update room_id="6577825" rateplan_id="25077">

    <date_range from="2019-06-01" to="2019-06-30"/>

      <deviation base_price="1000.0">

       <occupancy person="1" percentage="10"/>

       <occupancy person="2" percentage="20"/>

       <occupancy person="3" percentage="20"/>

       <occupancy person="4" percentage="20"/>

    </deviation>

     <extra_bed>100.0</extra_bed>

    </prices>

    <restrictions>

     <closed>false</closed>

     <ctd>false</ctd>

     <cta>false</cta>

     <los>

      <min>1</min>

      <max>30</max>

     </los>

     <advancepurchase>

       <min>15</min>

       <max>30</max>

     </advancepurchase>

     <staythrough>

      <min>1</min>

     </staythrough>

    </restrictions>

   </update>

  </rate>

 </criteria>

</request>

3. SetAriV2 Response

<result TUID="558afd90-8cf1-11e9-9ae2-8b6047344a46" timestamp="1560330376169">

    <errors>

        <property id="5950804">

            <error code="22210" description="Max LOS cannot be less than Min Los"/>

            <error code="2201" description="Occupancy 1 rate: 20 Occupancy 2 rate: 20 Occupancy 3 rate: 20 Occupancy 4 rate: 20 Occupancy 5 rate: 20 should be between 25 and 100000"/>

        </property>

    </errors>

</result>


3.2 SetAriV2_Partial_Success_Response (NEW)

<result TUID="58f2b811-d1de-11ed-9b0d-9fa08989ceb6" timestamp="1680498842365" status="PartialSuccess">

    <errors>

        <property id="2458545">

                <inventory>

                    <update room_id="3166794">

                        <date_range from="2023-06-09" to="2023-06-09">

                            <error code="2219" description="Date can not be greater than 730 days"/>

                        </date_range>

                    </update>

                </inventory>

                <rate>

                    <update room_id="3166794" rateplan_id="1222082">

                        <date_range from="2023-06-10" to="2023-06-10">

                            <error code="2101" description="Default rate is required but does not exist"/>

                        </date_range>

                    </update>

                </rate>

        </property>

    </errors>

</result>

3.3 SetAriV2_Success_Response

<result TUID="5c798be0-8cf0-11e9-9b99-11547cdafa77" timestamp="1560329958302"/>

4. SetAriV2 Schema

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

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

           elementFormDefault="qualified">

    <xs:simpleType name="dow">

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

            <xs:enumeration value="1"/>

            <xs:enumeration value="2"/>

            <xs:enumeration value="3"/>

            <xs:enumeration value="4"/>

            <xs:enumeration value="5"/>

            <xs:enumeration value="6"/>

            <xs:enumeration value="7"/>

        </xs:restriction>

    </xs:simpleType>

    <xs:simpleType name="allotment">

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

            <xs:minInclusive value="1"/>

            <xs:maxInclusive value="999"/>

        </xs:restriction>

    </xs:simpleType>

    <xs:simpleType name="currency">

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

            <xs:minLength value="3"/>

            <xs:maxLength value="3"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="endpointtype">

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

            <xs:enumeration value="10"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="minstaythrough">

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

            <xs:minInclusive value="0" />

            <xs:maxInclusive value="30" />

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="update-mode">

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

            <xs:enumeration value="OVERWRITE"/>

            <xs:enumeration value="OVERLAY"/>

            <xs:enumeration value="STRICT"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="decimal-with-zero">

        <xs:annotation>

            <xs:documentation>The decimal value with precision 2 and total digits 18.

            </xs:documentation>

        </xs:annotation>

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

            <xs:totalDigits value="18"/>

            <xs:fractionDigits value="2"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="positive-decimal-with-zero">

        <xs:annotation>

            <xs:documentation>The positive-decimal type specifies a positive decimal value with precision 2.

            </xs:documentation>

        </xs:annotation>

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

            <xs:minInclusive value="0"/>

            <xs:totalDigits value="18"/>

            <xs:fractionDigits value="2"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="idType">

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

            <xs:minLength value="1"/>

            <xs:maxLength value="200"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="propertyIdType">

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

            <xs:minLength value="1"/>

            <xs:maxLength value="20"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="personType">

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

            <xs:minInclusive value="1"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="orderType">

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

            <xs:enumeration value="ASC"/>

            <xs:enumeration value="DESC"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="losType">

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

            <xs:minInclusive value="1"/>

            <xs:maxInclusive value="99"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:simpleType name="baseOccType">

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

            <xs:minInclusive value="1"/>

            <xs:totalDigits value="9"/>

        </xs:restriction>

    </xs:simpleType>


    <xs:complexType name="inventory_restriction">

        <xs:all>

            <xs:element type="xs:boolean" name="closed" minOccurs="0" maxOccurs="1"/>

            <xs:element type="xs:boolean" name="ctd" minOccurs="0" maxOccurs="1"/>

            <xs:element type="xs:boolean" name="cta" minOccurs="0" maxOccurs="1"/>

        </xs:all>

    </xs:complexType>


    <xs:complexType name="rate_restriction">

        <xs:all>

            <xs:element type="xs:boolean" name="closed" minOccurs="0" maxOccurs="1"/>

            <xs:element type="xs:boolean" name="ctd" minOccurs="0" maxOccurs="1"/>

            <xs:element type="xs:boolean" name="cta" minOccurs="0" maxOccurs="1"/>

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

                <xs:complexType>

                    <xs:all>

                        <xs:element name="min" type="losType" minOccurs="0" maxOccurs="1"/>

                        <xs:element name="max" type="losType" minOccurs="0" maxOccurs="1"/>

                    </xs:all>

                </xs:complexType>

            </xs:element>

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

                <xs:complexType>

                    <xs:all>

                        <xs:element name="min" type="minstaythrough" minOccurs="1" maxOccurs="1"/>

                    </xs:all>

                </xs:complexType>

            </xs:element>

        </xs:all>

    </xs:complexType>


    <xs:complexType name="inventory">

        <xs:sequence>

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

                <xs:complexType>

                    <xs:sequence>

                        <xs:choice maxOccurs="1" minOccurs="1">

                            <xs:element ref="date_range" maxOccurs="1" minOccurs="1"/>

                            <xs:element ref="date_values" maxOccurs="1" minOccurs="1"/>

                        </xs:choice>

                        <xs:choice>

                            <xs:sequence>

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

                                <xs:element name="restrictions" type="inventory_restriction" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                            <xs:sequence>

                                <xs:element name="restrictions" type="inventory_restriction" minOccurs="1" maxOccurs="1"/>

                                <xs:element name="allotment" type="allotment" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                        </xs:choice>

                    </xs:sequence>

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

                </xs:complexType>

            </xs:element>

        </xs:sequence>

    </xs:complexType>


    <xs:complexType name="rate">

        <xs:sequence>

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

                <xs:complexType>

                    <xs:sequence>

                        <xs:choice maxOccurs="1" minOccurs="1">

                            <xs:element ref="date_range" maxOccurs="1" minOccurs="1"/>

                            <xs:element ref="date_values" maxOccurs="1" minOccurs="1"/>

                        </xs:choice>

                        <xs:choice>

                            <xs:sequence>

                                <xs:element ref="prices" minOccurs="1" maxOccurs="1"/>

                                <xs:element name="restrictions" type="rate_restriction" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                            <xs:sequence>

                                <xs:element name="restrictions" type="rate_restriction" minOccurs="1" maxOccurs="1"/>

                                <xs:element ref="prices" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                        </xs:choice>

                    </xs:sequence>

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

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

                </xs:complexType>

            </xs:element>

        </xs:sequence>

    </xs:complexType>


    <xs:complexType name = "normalOccupancy">

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

        <xs:attribute type="positive-decimal-with-zero" name="price" use="required"/>

    </xs:complexType>


    <xs:complexType name = "deviationOccupancy">

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

        <xs:attribute type="decimal-with-zero" name="percentage"/>

        <xs:attribute type="decimal-with-zero" name="amount"/>

    </xs:complexType>


    <xs:element name="normal">

        <xs:complexType>

            <xs:sequence>

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

            </xs:sequence>

            <xs:attribute type="positive-decimal-with-zero" name="default" />

        </xs:complexType>

    </xs:element>


    <xs:element name="deviation">

        <xs:complexType>

            <xs:sequence>

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

            </xs:sequence>

            <xs:attribute type="baseOccType" name="base_occupancy"/>

            <xs:attribute type="positive-decimal-with-zero" name="base_price" use="required"/>

            <xs:attribute type="decimal-with-zero" name="percentage" />

            <xs:attribute type="orderType" name="order" />

            <xs:attribute type="decimal-with-zero" name="amount"/>

        </xs:complexType>

    </xs:element>


    <xs:element name="prices">

        <xs:complexType>

            <xs:choice>

                <xs:sequence>

                    <xs:element ref="normal" minOccurs="1" maxOccurs="1"/>

                    <xs:element type="positive-decimal-with-zero" name="extra_bed" minOccurs="0" maxOccurs="1"/>

                </xs:sequence>

                <xs:sequence>

                    <xs:element ref="deviation" minOccurs="1" maxOccurs="1"/>

                    <xs:element type="positive-decimal-with-zero" name="extra_bed" minOccurs="0" maxOccurs="1"/>

                </xs:sequence>

            </xs:choice>

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

        </xs:complexType>

    </xs:element>


    <xs:element name="date_values">

        <xs:complexType>

            <xs:sequence>

                <xs:element type="xs:date" name="value" maxOccurs="31" minOccurs="1"/>

            </xs:sequence>

        </xs:complexType>

    </xs:element>


    <xs:element name="date_range">

        <xs:complexType>

            <xs:sequence>

                <xs:element type="dow" name="dow" maxOccurs="7" minOccurs="0"/>

            </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:element name="request">

        <xs:complexType>

            <xs:sequence>

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

                    <xs:complexType>

                        <xs:choice>

                            <xs:sequence>

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

                                <xs:element name="rate" type="rate" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                            <xs:sequence>

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

                                <xs:element name="inventory" type="inventory" minOccurs="0" maxOccurs="1"/>

                            </xs:sequence>

                        </xs:choice>

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

                    </xs:complexType>

                </xs:element>

            </xs:sequence>

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

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

        </xs:complexType>

    </xs:element>

</xs:schema>