Availability and Rates

SetARI V2 - Basic Mode / Use same price for all occupancies
SetARI V2 - Use custom prices for all occupancies
SetARI V2 - Use custom deviation for each occupancy with amount
SetARI V2 - Deviation Mode Percentage
SetARI V2 - Response
GetARIV2 - Request and Response
Element and Attribute (Data Type)
> Set ARI Request
> Set ARI Response
> Get ARI Request
> Get ARI Response


SetARI V2 - Basic Mode / Use same price for all occupancies

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Request - Basic Mode / Use same price for all occupancies

curl --location 'https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE' \ 
            --header 'Content-Type: application/xml' \
            --data '<?xml version="1.0" encoding="UTF-8"?>
            <request timestamp="1563330485525" type="10">
                <criteria property_id="10730279">
                    <rate>
                        <update room_id="129340033" rateplan_id="3392615">
                            <date_range from="2022-01-01" to="2022-01-01"/>
                            <prices currency="THB">
                                <normal default="2000.0"/>
                                <extra_bed>100.0</extra_bed>
                                <child_rates>
                                    <child_rate age_band_code="1" price="500.0"/>
                                    <child_rate age_band_code="2" price="600.0"/>
                                    <child_rate age_band_code="3" price="700.0"/>
                                </child_rates>
                            </prices>
                            <restrictions>
                                <closed>false</closed>
                                <ctd>false</ctd>
                                <cta>false</cta>
                                <los>
                                    <min>1</min>
                                    <max>30</max>
                                </los>
                            </restrictions>
                        </update>
                    </rate>
                </criteria>
            </request>'
            

Price Table - Max Occupancy = 5

The following table illustrates example rates for each occupancy for a room with a maximum available occupancy of 5 guests.

Occupancy12345
Price2000.0 THB2000.0 THB2000.0 THB2000.0 THB2000.0 THB

Example Response

<result TUID="89f66310-6718-11e5-b298-0758c951ac41" timestamp="1443579079617"/>


SetARI V2 - Use custom prices for all occupancies

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Request - Use custom prices for all occupancies

curl --location 'https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE' \
            --header 'Content-Type: application/xml' \
            --data '<?xml version="1.0" encoding="UTF-8"?>
            <request timestamp="1563330485525" type="10">
                <criteria property_id="10730279">
                    <rate>
                        <update room_id="129340033" rateplan_id="3392615" >
                            <date_range from="2022-01-01" to="2022-01-01"/>
                            <prices currency="THB">
                                <normal>
                                    <occupancy person="1" price="1000.0"/>
                                    <occupancy person="2" price="1200.0"/>
                                    <occupancy person="3" price="1400.0"/>
                                    <occupancy person="4" price="1600.0"/>
                                    <occupancy person="5" price="1800.0"/>
                                </normal>
                                <extra_bed>100.0</extra_bed>
                                <child_rates>
                                    <child_rate age_band_code="1" price="500.0"/>
                                    <child_rate age_band_code="2" price="600.0"/>
                                    <child_rate age_band_code="3" price="700.0"/>
                                </child_rates>
                            </prices>
                            <restrictions>
                                <closed>false</closed>
                                <ctd>false</ctd>
                                <cta>false</cta>
                                <los>
                                    <min>1</min>
                                    <max>30</max>
                                </los>
                            </restrictions>
                        </update>
                    </rate>
                </criteria>
            </request>

Price Table - Max Occupancy = 5

The following table illustrates example rates for each occupancy for a room with a maximum available occupancy of 5 guests.

Occupancy12345
Price1000.0 THB1200.0 THB1400.0 THB1600.0 THB1800.0 THB

Example Response

<result TUID="89f66310-6718-11e5-b298-0758c951ac41" timestamp="1443579079617"/>


SetARI V2 - Use custom deviation for each occupancy with amount

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Request - Use custom deviation for each occupancy with amount

Amount refers to the amount by which the price for the indicated occupancy deviates from the base_price.

curl --location 'https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE' \
            --header 'Content-Type: application/xml' \
            --data '<?xml version="1.0" encoding="UTF-8"?>
            <request timestamp="1563330485525" type="10">
                <criteria property_id="10730279">
                    <rate>
                        <update room_id="129340033" rateplan_id="3392615" >
                            <date_range from="2022-01-01" to="2022-01-01"/>
                            <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>
                                <child_rates>
                                    <child_rate age_band_code="1" price="500.0"/>
                                    <child_rate age_band_code="2" price="600.0"/>
                                    <child_rate age_band_code="3" price="700.0"/>
                                </child_rates>
                            </prices>
                            <restrictions>
                                <closed>false</closed>
                                <ctd>false</ctd>
                                <cta>false</cta>
                                <los>
                                    <min>1</min>
                                    <max>30</max>
                                </los>
                            </restrictions>
                        </update>
                    </rate>
                </criteria>
            </request>

Price Table - Max Occupancy = 4

The following table illustrates example rates for each occupancy for a room with a maximum available occupancy of 4 guests.

Occupancy1234
Price1000.0 THB1100.0 THB1200.0 THB1300.0 THB

Example Response

<result TUID="89f66310-6718-11e5-b298-0758c951ac41" timestamp="1443579079617"/>


SetARI V2 - Deviation Mode Percentage

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Request - Deviation Mode Percentage

Amount refers to the percentage by which the price for the indicated occupancy deviates from the base_price. Percentage can be either positive or negative.

curl --location 'https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE' \
            --header 'Content-Type: application/xml' \
            --data '<?xml version="1.0" encoding="UTF-8"?>
            <request timestamp="1563330485525" type="10">
                <criteria property_id="10730279">
                    <rate>
                        <update room_id="129340033" rateplan_id="3392615" >
                            <date_range from="2022-01-01" to="2022-01-01"/>
                            <prices currency="THB">
                                <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>
                                <child_rates>
                                    <child_rate age_band_code="1" price="500.0"/>
                                    <child_rate age_band_code="2" price="600.0"/>
                                    <child_rate age_band_code="3" price="700.0"/>
                                </child_rates>
                            </prices>
                            <restrictions>
                                <closed>false</closed>
                                <ctd>false</ctd>
                                <cta>false</cta>
                                <los>
                                    <min>1</min>
                                    <max>30</max>
                                </los>
                            </restrictions>
                        </update>
                    </rate>
                </criteria>
            </request>

Price Table - Max Occupancy = 4

The following table illustrates example rates for each occupancy for a room with a maximum available occupancy of 4 guests.

Occupancy1234
Price1100.0 THB1200.0 THB1200.0 THB1200.0 THB

Example Response

<result TUID="89f66310-6718-11e5-b298-0758c951ac41" timestamp="1443579079617"/>


SetARI V2 - Response

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Response - Total Failure Response

  • HTTP Code = 400,401
<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>
        

Example Response - Partial Success Response

  • HTTP Code = 207
  • Partial Success XML response format will be available after enabling the configuration at channel manager level
  • If the configuration is not enabled, channel manager would receive XML error response in the total failure error response but with HTTP Code = 207
<result TUID="58f2b811-d1de-11ed-9b0d-9fa08989ceb6" status="PartialSuccess" timestamp="1680498842365">
    <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 rateplan_id="1222082" room_id="3166794">
                    <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>
        

Example Response - Success Response

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


GetARIV2 - Request and Response

Request URL: https://supply.agoda.com/api?apiKey=ADDYOURAPIKEYHERE

Example Request

<?xml version="1.0" encoding="UTF-8"?>
            <request timestamp="{{now}}" type="11">
                <criteria from="2022-01-01" to="2022-01-01">
                    <property id="10730279" room_id="129340033" rateplan_id="3392615"  />
                </criteria>
            </request>

Example Response

<result timestamp="1587536851338">
            <properties item_count="1">
                <property id="10730279" date="2020-05-16">
                    <rates rateplan_id="3392615" currency="THB">
                        <room room_id="129340033" closed="false" cta="true" ctd="false" min_los="1" max_los="30" min_staythrough="0">
                            <prices>
                                <occupancy person="1" price="80.00"/>
                                <occupancy person="2" price="80.00"/>
                                <occupancy person="3" price="80.00"/>
                            </prices>
                            <child_rates>
                                <child_rate age_from="0" age_to="5" price="40.00" age_band_code="1"/>
                                <child_rate age_from="6" age_to="10" price="45.00" age_band_code="2"/>
                                <child_rate age_from="11" age_to="14" price="50.00" age_band_code="3"/>
                                <child_rate age_from="15" age_to="17" price="55.00" age_band_code="4"/>
                            </child_rates>
                        </room>
                    </rates>
                    <inventories>
                        <room room_id="129340033" allotment="3" guaranteed_allotment="0" allotment_used_regular="0" allotment_used_guaranteed="0" closed="false" cta="true" ctd="false"/>
                    </inventories>
                </property>
            </properties>
        </result>






Availability and Rates Element and Attribute

Set ARI Request

Element/AttributeData TypeOccursRequiredExamplesDescription
Request
Timestamp
Numeric1Y1483526410357
(GMT: Wed, 04 Jan 2017 10:40:10.357)
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred. Time provided must correspond with the time in the originating system and in EPOCH. System requires EPOCH timestamps in milliseconds.
TypeNumeric Length 11Y1This number identifies a particular
request:
1 SetAri
2 GetAri
3 GetBookingList
4 GetBookingDetail
5 GetProduct
8 SetProduct
9 GetBookingListV2
10 SetAriV2
Criteria
Property Id
String Length 1-201Y12345678910Every request must contain a valid property ID that partner has access to. Every property has a unique ID in Agoda and every Channel Manager partner has to have the access to this specific property via an authorized API key.
Inventory
Update room_id
Numeric Length 1-20unboundedY72027This is the Agoda room ID related to the property inventory element. Agoda active Room IDs can be returned with Getproduct request. If no room is specified in the request, all active Rooms will be returned in the response.
date_range from toDate YYYY-MM-DDunboundedY2016-04-02Date Range information for request. From = inclusive start date for the inventory request To = inclusive end date for the inventory request
dowNumeric Length 1-71 to 7N1Denotes the day of the week which needs to be updated via the SetAri request:
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
7 = Sunday
Note: DOW can only be used in conjunction with date_range
allotmentNumeric length 1-31Y2Controls if room type is open for sale or closed to sale. Close will stop room type regular inventory being sold even if inventory is available. Guaranteed inventory is still available for sale if close is applied.
Restrictions
closed
boolean1YTRUE or 1Controls if room type is open for sale or closed to sale. Close will stop room type regular inventory being sold even if inventory is available. Guaranteed inventory is still available for sale if close is applied.
ctdboolean1NFALSE or 0Set to make room type open for departure for this date or closed for departure on this date. Customer can still stay through this date if they depart on future date. Not mandatory and if element not sent, Close to Departure status in extranet remains same as current.
ctabooleanNFALSE or 0Set to make room type open for arrival for this date or closed for arrival on this date. Customer can still stay through this date if they arrive on past date. Not mandatory and if element not sent, Close to Arrival status in extranet remains same as current.
Rate
Update room_id
Numeric Length 1-20unboundedY72027This is the Agoda room ID related to the property inventory element. Agoda active Room IDs can be returned with Getproduct request. If no room is specified in the request, all active Rooms will be returned in the response.
Rateplan_idNumeric Length 1-6unboundedY1 to 6This is the Agoda Rateplan ID related to a particular offer active on a room. Agoda active Rate Type IDs can be returned with Getproduct request. If no Rateplan ID is specified in the request, all active Rateplans will be returned in the response.
Date_values valueDate YYYY-MM-DD1 to 31YMaximum 31 date values can be set in the request. Alternatively, the date_range from/to can be used at this point of the request.
prices
currency
Alpha 31YTHBThe Currency must match with the property currency.
Normal DefaultNumeric Length 1-91N250.0The rate is applied to all occupancies
Normal Occupancy PersonNumericunboundedN300.0Number of occupancies the price will applied to.
Normal Occupancy PriceNumeric Length 1-9unboundedN350.0The price for the specified occupancy.
deviation base_priceNumeric Length 1-91N400.0This price is use as the base for the deviation (amount or percentage) of each occupancy.
deviation occupancy percentageNumeric Lenght 1-9unboundedN10The deviation in percentage for the specified occupancy.
deviation occupancy ammountNumeric Lenght 1-9unboundedN10.0/td>The deviation in ammount for the specified occupancy.
Extra bedNumeric nnn.nn1N100.0/td>This rate is used as the extra bed rate and is available to all hotel occupancy models. ‘0’ extra bed rate indicates extra bed is not available for sale for the specified room, rateplan and date (closed for sale). Extra bed rate can only be set if num_extrabed is set to ‘1’ or more.
child_rates
child_rate price
Numeric nnn.nnunboundedN200.0This is the rate amount for the child pricing for the specific age band. ‘0’ child price rate indicates the child will not be charged for the specified room, rateplan and date.
child_rate age_band_codeNumericunboundedN2This is the code used to uniquely identify the child age band.
Restrictions
closed
boolean1NTRUE or 1Controls if room type is open for sale or closed to sale. Close will stop room type regular inventory being sold even if inventory is available. Guaranteed inventory is still available for sale if close is applied. Not mandatory and if element not sent, close out status in extranet remains same as current.
ctdboolean1NFALSE or 0Set to make rate type open for departure for this date or closed for departure on this date. Customer can still stay through this date if they depart on future date. Not mandatory and if element not sent, Close to Departure status in extranet remains same as current.
ctaboolean1NFALSE or 0Set to make rate type open for arrival for this date or closed for arrival on this date. Customer can still stay through this date if they arrive on past date. Not mandatory and if element not sent, Close to Arrival status in extranet remains same as current.
LOS
min
Numeric length 1-21N1 to 99Minimum length of stay that is required to search and book this room type. MinLOS cannot be greater than maxLOS. To remove minLOS restriction, default value = ‘1’.
maxNumeric length 1-21N0 to 99Minimum length of stay that is required to search and book this room type. MaxLOS cannot be less than minLOS. To remove maxLOS restriction, default value = ‘0’.
ADVANCE PURCHASE
min
Numeric length 1-30N0 to 365Minimum Advance Purchase that is required to search and book this room type. To remove min Advance Purchase restriction, default value = ‘0’.
maxNumeric length 1-30N0 to 365Maximum Advance Purchase that is required to search and book this room type. To remove max Advance Purchase restriction, default value = ‘0’.
STAYTHROUGH
min
Numeric1N0 to 30Minimum length of stay that is required to search and book this room type for stay through. Not mandatory and if element not sent, Min stay through remains same as current.
To remove min stay through restriction, set min = ‘0’.

Set ARI Response

Element/AttributeData TypeOccursRequiredExamplesDescription
Result
TUID
String length 131Y89f66310-6718-11e5-b298-0758c951ac41A Track Unique Identifier (TUID) is an identifier which is guaranteed to be unique and it has a specific tracking purpose.

Get ARI Request

Element/AttributeData TypeOccursRequiredExamplesDescription
Request
Timestamp
Numeric1Y1483526410357
(GMT: Wed, 04 Jan 2017 10:40:10.357)
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred. Time provided must correspond with the time in the originating system and in EPOCH. System requires EPOCH timestamps in milliseconds.
TypeNumeric Length 11Y2This number identifies a particular request:
1 SetAri
2 GetAri
3 GetBookingList
4 GetBookingDetail
5 GetProduct
8 SetProduct
9 GetBookingListV2
10 SetAriV2
Criteria
from to
Datetime YYYY-MM-DD HH:MM:SS1Y2015-09-01T00:00:00+07:00The inclusive start (from) and end (to) date and time for the query. Time of reference is always UTC time zone +/- to identify other timezones. The date range cannot be longer than 31 days.
Property
Id
String Length 1-201 to 5Y123Every request must contain a valid property ID that partner has access to. Every property has a unique ID in Agoda and every Channel Manager partner must have the access to this specific property via an authorized API key. Maximum 5 property IDs can be queried in this GetARI request.
Room_idNumeric Length 1-201N85236This is the Agoda room ID related to the property inventory element. Agoda active Room IDs can be returned with Getproduct request. If no room is specified in the request, all active Rooms will be returned in the response.
Rateplan_idNumeric Length 1-61N24468This is the Agoda Rateplan ID related to a particular offer active on a room. Agoda active Rate Type IDs can be returned with Getproduct request. If no Rateplan ID is specified in the request, all active Rateplans will be returned in the response.
TypeAlpha1NInventoryThe type in the criteria>>request can be one of the following:
rate
inventory
both

Get ARI Response

Element/AttributeData TypeOccursRequiredExamplesDescription
Request
Timestamp
Numeric1Y1483526410357
(GMT: Wed, 04 Jan 2017 10:40:10.357)
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred. Time provided must correspond with the time in the originating system and in EPOCH. System requires EPOCH timestamps in milliseconds.
TypeNumeric Length 11Y2This number identifies a particular request:
1 SetAri
2 GetAri
3 GetBookingList
4 GetBookingDetail
5 GetProduct
8 SetProduct
9 GetBookingListV2
10 SetAriV2
Criteria
from to
Datetime YYYY-MM-DD HH:MM:SS1Y2015-09-01T00:00:00+07:00The inclusive start (from) and end (to) date and time for the query. Time of reference is always UTC time zone +/- to identify other timezones. The date range cannot be longer than 31 days.
Property
Id
String Length 1-201 to 5Y123Every request must contain a valid property ID that partner has access to. Every property has a unique ID in Agoda and every Channel Manager partner must have the access to this specific property via an authorized API key. Maximum 5 property IDs can be queried in this GetARI request.
Room_idNumeric Length 1-201N85236This is the Agoda room ID related to the property inventory element. Agoda active Room IDs can be returned with Getproduct request. If no room is specified in the request, all active Rooms will be returned in the response.
Rateplan_idNumeric Length 1-61N24468This is the Agoda Rateplan ID related to a particular offer active on a room. Agoda active Rate Type IDs can be returned with Getproduct request. If no Rateplan ID is specified in the request, all active Rateplans will be returned in the response.
TypeAlpha1NInventoryThe type in the criteria>>request can be one of the following:
rate
inventory
both