# Getting Availabilities & Rates from AGODAwith the following JSON Body.
Request Response Generated XML Copy {
"pid" : 13361242 ,
"room_id" : 150952948 ,
"ratePlan_id" : 4759409 ,
"from" : "2020-04-24" ,
"to" : "2020-04-25"
}
Some restrictions apply in the Retrieval of ARI.
e.g The date range cannot be longer than 31 days.
Every request must contain a valid property ID that partner has access to.
# Setting Availabilities at AGODAIn order to set the availability of a property, you need to make a POST to the following endpoint
# Room based pricingRequest Response Generated XML Copy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-25"
} ,
"prices" : {
"currency" : "USD" ,
"base_price" : 40 ,
"extra_bed" : "20"
}
}
]
}
# Occupancy based pricingRequest Response Generated XML Copy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-25"
} ,
"prices" : {
"base_price" : 40 ,
"currency" : "USD" ,
"normal" : {
"occupancy" : [ {
"person" : 1 ,
"price" : "40.0"
} ,
{
"person" : 2 ,
"price" : "80.0"
} ,
{
"person" : 3 ,
"price" : "120.0"
}
]
} ,
"extra_bed" : "20"
}
}
]
}
# Inventory Update (single day)Copy {
"property_id" : 13361242 ,
"inventory" :
[ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-24"
} ,
"allotment" : 6
} ]
}
# Set Rates & Inventory for set of datesCopy {
"property_id" : 13361242 ,
"inventory" :
[ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-29" ,
"to" : "2020-04-30" ,
"dow" : [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ]
} ,
"allotment" : 9 ,
"restrictions" : {
"closed" : false ,
"ctd" : false ,
"cta" : true
}
} ]
,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-29"
} ,
"prices" : {
"currency" : "USD" ,
"base_price" : 40 ,
"normal" : {
"occupancy" : [ {
"person" : 1 ,
"price" : "1000.0"
} ,
{
"person" : 2 ,
"price" : "2000.0"
} ,
{
"person" : 3 ,
"price" : "3000.0"
}
]
} ,
"extra_bed" : "20"
} ,
"restriction" : {
"closed" : false ,
"los" : {
"min" : 1 ,
"max" : 30
} ,
"staythrough" : 2
}
}
]
}
# Set Different Inventory for specific Day Of WeekThe following example will update only the inventory of monday (dow=1) from the rates
Copy {
"property_id" : 13361242 ,
"inventory" : [ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-25" ,
"to" : "2020-04-28" ,
"dow" : [ 1 ]
} ,
"allotment" : 3
} ]
}
# Set Different price for specific Day Of WeekThe following example will update only the price of monday (dow=1) from the rates
Copy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-30" ,
"dow" : [ 1 ]
} ,
"prices" : {
"currency" : "USD" ,
"base_price" : 50 ,
"extra_bed" : "10"
}
}
]
}
# Set CTA & CTD for single dateThe example below sets true for cta & ctd for dow=1 for a specific range.
You may set it for all days if you remove Dow or include dow=[1,2,3,4,5,6,7]
Copy {
"property_id" : 13361242 ,
"inventory" : [ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-25" ,
"to" : "2020-04-28" ,
"dow" : [ 1 ]
} ,
"allotment" : 3 ,
"restrictions" : {
"closed" : false ,
"ctd" : true ,
"cta" : true
}
} ]
}
# Close ROOM at Inventory LevelThis example will close a room at inventory level for specific day of week within a date range
You may set it for all days if you remove Dow or include dow=[1,2,3,4,5,6,7]
Copy {
"property_id" : 13361242 ,
"inventory" : [ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-25" ,
"to" : "2020-04-28" ,
"dow" : [ 1 ]
} ,
"restrictions" : {
"closed" : true
}
} ]
}
# Close ROOM at Rate LevelThis example will close a room at rate level for specific day of week within a date range
You may set it for all days if you remove Dow or include dow=[1,2,3,4,5,6,7]
Copy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-25" ,
"dow" : [ 5 ]
} ,
"restriction" : {
"closed" : true
}
} ]
}
# Set MinLOS and/or MaxLOSCopy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-25" ,
"dow" : [ 5 ]
} ,
"restriction" : {
"los" : {
"min" : 2 ,
"max" : 9
}
}
} ]
}
# Lift (Remove) MinLOS and/or MaxLOSMinLost is removed by setting it to 1 and MaxLos should be set to 0
Copy {
"property_id" : 13361242 ,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-25" ,
"dow" : [ 5 ]
} ,
"restriction" : {
"los" : {
"min" : 1 ,
"max" : 0
}
}
} ]
}
# Comprehensive ExampleCopy {
"property_id" : 13361242 ,
"inventory" :
[ {
"room_id" : 150952948 ,
"date_range" : {
"from" : "2020-04-23" ,
"to" : "2020-04-29" ,
"dow" : [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ]
} ,
"allotment" : 9 ,
"restrictions" : {
"closed" : false ,
"ctd" : false ,
"cta" : true
}
} ]
,
"rate" : [ {
"room_id" : 150952948 ,
"rateplan_id" : 4759409 ,
"date_range" : {
"from" : "2020-04-24" ,
"to" : "2020-04-29"
} ,
"prices" : {
"currency" : "EUR" ,
"base_price" : 40 ,
"normal" : {
"occupancy" : [ {
"person" : 1 ,
"price" : "1000.0"
} ,
{
"person" : 2 ,
"price" : "2000.0"
} ,
{
"person" : 3 ,
"price" : "3000.0"
} ,
{
"person" : 4 ,
"price" : "4000.0"
}
]
} ,
"deviation" : {
"occupancy" : [ {
"person" : 1 ,
"amount" : "0.0"
} ,
{
"person" : 2 ,
"amount" : "100.0"
} ,
{
"person" : 3 ,
"amount" : "200.0"
} ,
{
"person" : 4 ,
"amount" : "300.0"
}
]
} , "deviation" : {
"occupancy" : [ {
"person" : 1 ,
"percentage" : "0.0"
} ,
{
"person" : 2 ,
"percentage" : "100.0"
} ,
{
"person" : 3 ,
"percentage" : "200.0"
} ,
{
"person" : 4 ,
"percentage" : "300.0"
}
]
} ,
"extra_bed" : "20"
} ,
"restriction" : {
"closed" : false ,
"los" : {
"min" : 1 ,
"max" : 30
} ,
"staythrough" : 2
}
}
]
}