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.
| Occupancy | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Price | 2000.0 THB | 2000.0 THB | 2000.0 THB | 2000.0 THB | 2000.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.
| Occupancy | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Price | 1000.0 THB | 1200.0 THB | 1400.0 THB | 1600.0 THB | 1800.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.
| Occupancy | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Price | 1000.0 THB | 1100.0 THB | 1200.0 THB | 1300.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.
| Occupancy | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Price | 1100.0 THB | 1200.0 THB | 1200.0 THB | 1200.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/Attribute | Data Type | Occurs | Required | Examples | Description |
|---|---|---|---|---|---|
| Request Timestamp | Numeric | 1 | Y | 1483526410357 (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. |
| Type | Numeric Length 1 | 1 | Y | 1 | This 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-20 | 1 | Y | 12345678910 | Every 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-20 | unbounded | Y | 72027 | This 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 to | Date YYYY-MM-DD | unbounded | Y | 2016-04-02 | Date Range information for request. From = inclusive start date for the inventory request To = inclusive end date for the inventory request |
| dow | Numeric Length 1-7 | 1 to 7 | N | 1 | Denotes 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 |
| allotment | Numeric length 1-3 | 1 | Y | 2 | Controls 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 | boolean | 1 | Y | TRUE or 1 | Controls 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. |
| ctd | boolean | 1 | N | FALSE or 0 | Set 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. |
| cta | boolean | N | FALSE or 0 | Set 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-20 | unbounded | Y | 72027 | This 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_id | Numeric Length 1-6 | unbounded | Y | 1 to 6 | This 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 value | Date YYYY-MM-DD | 1 to 31 | Y | Maximum 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 3 | 1 | Y | THB | The Currency must match with the property currency. |
| Normal Default | Numeric Length 1-9 | 1 | N | 250.0 | The rate is applied to all occupancies |
| Normal Occupancy Person | Numeric | unbounded | N | 300.0 | Number of occupancies the price will applied to. |
| Normal Occupancy Price | Numeric Length 1-9 | unbounded | N | 350.0 | The price for the specified occupancy. |
| deviation base_price | Numeric Length 1-9 | 1 | N | 400.0 | This price is use as the base for the deviation (amount or percentage) of each occupancy. |
| deviation occupancy percentage | Numeric Lenght 1-9 | unbounded | N | 10 | The deviation in percentage for the specified occupancy. |
| deviation occupancy ammount | Numeric Lenght 1-9 | unbounded | N | 10.0/td> | The deviation in ammount for the specified occupancy. |
| Extra bed | Numeric nnn.nn | 1 | N | 100.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.nn | unbounded | N | 200.0 | This 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_code | Numeric | unbounded | N | 2 | This is the code used to uniquely identify the child age band. |
| Restrictions closed | boolean | 1 | N | TRUE or 1 | Controls 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. |
| ctd | boolean | 1 | N | FALSE or 0 | Set 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. |
| cta | boolean | 1 | N | FALSE or 0 | Set 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-2 | 1 | N | 1 to 99 | Minimum 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’. |
| max | Numeric length 1-2 | 1 | N | 0 to 99 | Minimum 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-3 | 0 | N | 0 to 365 | Minimum Advance Purchase that is required to search and book this room type. To remove min Advance Purchase restriction, default value = ‘0’. |
| max | Numeric length 1-3 | 0 | N | 0 to 365 | Maximum Advance Purchase that is required to search and book this room type. To remove max Advance Purchase restriction, default value = ‘0’. |
| STAYTHROUGH min | Numeric | 1 | N | 0 to 30 | Minimum 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/Attribute | Data Type | Occurs | Required | Examples | Description |
|---|---|---|---|---|---|
| Result TUID | String length 13 | 1 | Y | 89f66310-6718-11e5-b298-0758c951ac41 | A Track Unique Identifier (TUID) is an identifier which is guaranteed to be unique and it has a specific tracking purpose. |
Get ARI Request
| Element/Attribute | Data Type | Occurs | Required | Examples | Description |
|---|---|---|---|---|---|
| Request Timestamp | Numeric | 1 | Y | 1483526410357 (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. |
| Type | Numeric Length 1 | 1 | Y | 2 | This 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:SS | 1 | Y | 2015-09-01T00:00:00+07:00 | The 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-20 | 1 to 5 | Y | 123 | Every 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_id | Numeric Length 1-20 | 1 | N | 85236 | This 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_id | Numeric Length 1-6 | 1 | N | 24468 | This 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. |
| Type | Alpha | 1 | N | Inventory | The type in the criteria>>request can be one of the following: rate inventory both |
Get ARI Response
| Element/Attribute | Data Type | Occurs | Required | Examples | Description |
|---|---|---|---|---|---|
| Request Timestamp | Numeric | 1 | Y | 1483526410357 (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. |
| Type | Numeric Length 1 | 1 | Y | 2 | This 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:SS | 1 | Y | 2015-09-01T00:00:00+07:00 | The 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-20 | 1 to 5 | Y | 123 | Every 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_id | Numeric Length 1-20 | 1 | N | 85236 | This 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_id | Numeric Length 1-6 | 1 | N | 24468 | This 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. |
| Type | Alpha | 1 | N | Inventory | The type in the criteria>>request can be one of the following: rate inventory both |
Updated 17 days ago
