Availability resource provides information about dates and rooms that are available for booking.
Resources
| Resource | Description |
|---|---|
| POST /v1/Availability/Room | Get available rooms for a certain period of time |
| POST /v1/Availability/RoomType/Combined | Get available roomTypes for a bookingAgency and a period of time |
| POST /v1/Availability/RoomType/CombinedExtended | Get available roomTypes for a bookingAgency and a period of time with price and currency |
Get available rooms for a certain period of time.
Request parameters
| Name | Value |
|---|---|
| dateFrom | Start date |
| dateTo | End date |
| groupDates | 1/0 |
Response
| Name | Type | Description |
|---|---|---|
| roomId | int | Room ID in hoteliga |
| roomTypeId | int | Room type ID in hoteliga |
| availabilityDateRanges | array | an array of objects with two properties: dateRanges (array) and isAvailable (0/1) |
Example Request
<?xml version="1.0" encoding="UTF-8" ?>
<Availability>
<DateFrom>2016-11-10</DateFrom>
<DateTo>2016-11-25</DateTo>
<GroupDates>1</GroupDates>
</Availability>
{
"DateFrom":"2018-03-10",
"DateTo":"2018-03-20",
"groupDates": "1"
}
Example Response
<?xml version="1.0"?>
<AvailabilityResponse>
<AvailabilityResponseRoom>
<RoomId>1</RoomId>
<RoomTypeId>1</RoomTypeId>
<AvailabilityDateRanges>
<AvailabilityDateRange>
<DateRanges>
<DateRange>
<From>2018-03-10</From>
<To>2018-03-20</To>
</DateRange>
</DateRanges>
<IsAvailable>1</IsAvailable>
</AvailabilityDateRange>
</AvailabilityDateRanges>
</AvailabilityResponseRoom>
<AvailabilityResponseRoom>
<RoomId>2</RoomId>
<RoomTypeId>1</RoomTypeId>
<AvailabilityDateRanges>
<AvailabilityDateRange>
<DateRanges>
<DateRange>
<From>2018-03-10</From>
<To>2018-03-20</To>
</DateRange>
</DateRanges>
<IsAvailable>1</IsAvailable>
</AvailabilityDateRange>
</AvailabilityDateRanges>
</AvailabilityResponseRoom>
</AvailabilityResponse>
[
{
"roomId":1,
"roomTypeId":1,
"availabilityDateRanges":[
{
"dateRanges":[
{
"from":"2018-03-10",
"to":"2018-03-20"
}
],
"isAvailable":1
}
]
},
{
"roomId":2,
"roomTypeId":1,
"availabilityDateRanges":[
{
"dateRanges":[
{
"from":"2018-03-10",
"to":"2018-03-20"
}
],
"isAvailable":1
}
]
}
]
Gets availability per RoomType for a given BookingAgency and for a certain period.
Request parameters
| Name | Value |
|---|---|
| dateFrom | Start date |
| dateTo | End date |
| bookingAgencyId | Optional |
Example Request
<?xml version="1.0" encoding="UTF-8" ?>
<Availability>
<DateFrom>2017-03-10</DateFrom>
<DateTo>2017-03-21</DateTo>
<BookingAgencyId>27</BookingAgencyId>
</Availability>
{
dateFrom: "2017-03-10",
dateTo: "2017-03-21",
bookingAgencyId: 27
}
Example Response
<?xml version="1.0" ?>
<Availability>
<AvailableRooms>
<AvailableRoom roomTypeId="4" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="5" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="6" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="7" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="8" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="9" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="10" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
<AvailableRoom roomTypeId="11" isPropertyClosed="1" isRoomTypeClosed="1">0</AvailableRoom>
</AvailableRooms>
<Contracts />
<ClosedDates>
<ClosedDate>
<From>2017-03-10</From>
<To>2017-03-21</To>
</ClosedDate>
</ClosedDates>
<SoldOutDates />
</Availability>
{
"availableRooms":[
{
"roomTypeId":4,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":5,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":6,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":7,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":8,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":9,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":10,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
},
{
"roomTypeId":11,
"available":0,
"isPropertyClosed":1,
"isRoomTypeClosed":1
}
],
"contracts":[],
"closedDates":[
{
"from":"2017-03-10",
"to":"2017-03-21"
}
],
"soldOutDates":[]
}
Gets availability with price per RoomType for a given BookingAgency, Currency and for a certain period.
Request parameters
| Name | Value |
|---|---|
| dateFrom | Start date |
| dateTo | End date |
| bookingAgencyId | Optional |
| promoCode | Optional |
| currencyCode | Optional |
Example Request
<?xml version="1.0" encoding="UTF-8" ?>
<Availability>
<DateFrom>2017-03-10</DateFrom>
<DateTo>2017-03-21</DateTo>
<BookingAgencyId>27</BookingAgencyId>
<CurrencyCode>USD</CurrencyCode>
</Availability>
{
dateFrom: "2018-04-30",
dateTo: "2018-05-04",
bookingAgencyId: 27,
currencyCode: "USD"
}
Example Response
<?xml version="1.0"?>
<Availability>
<AvailableRooms>
<AvailableRoom roomTypeId="3" isPropertyClosed="0" isRoomTypeClosed="0" price="128.10" currencyCode="USD">2</AvailableRoom>
<AvailableRoom roomTypeId="4" isPropertyClosed="0" isRoomTypeClosed="0" price="128.10" currencyCode="USD">2</AvailableRoom>
<AvailableRoom roomTypeId="6" isPropertyClosed="0" isRoomTypeClosed="0" price="136.07" currencyCode="USD">6</AvailableRoom>
<AvailableRoom roomTypeId="5" isPropertyClosed="0" isRoomTypeClosed="0" price="136.07" currencyCode="USD">4</AvailableRoom>
<AvailableRoom roomTypeId="10" isPropertyClosed="0" isRoomTypeClosed="0" price="170.14" currencyCode="USD">2</AvailableRoom>
<AvailableRoom roomTypeId="7" isPropertyClosed="0" isRoomTypeClosed="0" price="136.07" currencyCode="USD">5</AvailableRoom>
<AvailableRoom roomTypeId="9" isPropertyClosed="0" isRoomTypeClosed="0" price="170.14" currencyCode="USD">6</AvailableRoom>
</AvailableRooms>
<Contracts>
<Contract contractId="8">
<DateRange>
<From>2018-04-30</From>
<To>2018-05-04</To>
</DateRange>
<PriceListId>21</PriceListId>
</Contract>
</Contracts>
<ClosedDates />
<SoldOutDates />
</Availability>
{
"availableRooms": [
{
"price": 128.1,
"currencyCode": "USD",
"roomTypeId": 3,
"available": 2,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 128.1,
"currencyCode": "USD",
"roomTypeId": 4,
"available": 2,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 136.07,
"currencyCode": "USD",
"roomTypeId": 6,
"available": 6,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 136.07,
"currencyCode": "USD",
"roomTypeId": 5,
"available": 4,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 170.14,
"currencyCode": "USD",
"roomTypeId": 10,
"available": 2,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 136.07,
"currencyCode": "USD",
"roomTypeId": 7,
"available": 5,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
},
{
"price": 170.14,
"currencyCode": "USD",
"roomTypeId": 9,
"available": 6,
"isPropertyClosed": 0,
"isRoomTypeClosed": 0
}
],
"contracts": [
{
"dateRange": {
"from": "2018-04-30",
"to": "2018-05-04"
},
"contractId": 8,
"priceListId": 21
}
],
"closedDates": [],
"soldOutDates": []
}