Ulyses Cloud allows you to filter the ReservationRoomStay's of a property based on different options. The technical specification is in the entity page and in the API endpoint page dedicated to ReservationRoomStay.
Use cases of the filters
Filtering reservations by booking number
Ulyses PMS identifies reservations by means of up to 4 different locators (OTA locator, CRS locator, CRS locator and Channel Manager locator). If we want to search a reservation by an specific locator we will utilize the following endpoint and we will filter by the locator afterwards. We can perform the same operation but requesting all the reservation room stays and then applying the same filter.
Filtering by situation
Let's say that you need to check the inHouse reservations. "inHouse" refers to a situation, and these can be checked at reservationSituationType endpoint. If you use that endpoint you will find a list similar to this one:
[{ "id": 1, "code": "CI", "name": "CheckIn" }, { "id": 2, "code": "CO", "name": "CheckOut" }, { "id": 3, "code": "IH", "name": "InHouse" }, { "id": 4, "code": "PEN", "name": "Pending" }, { "id": 5, "code": "NS", "name": "NoShow" }]
You can use the id 3 in the reservationRoomStay endpoint like this:
http://{ulysescloudURL}/public/api/v1/chain/1/property/3/reservation?reservationSituationTypeId=3
Filtering by the reservations that arrive today
To check which reservations are arriving today we use the arrivalFrom/arrivalTo filters. These are a range of days, but if we use the same date on both you will get the arrivals for a single date. Remember that the format is yyyy-MM-dd! That can be applied to departureFrom/departureTo, stayFrom/stayTo and createdFrom/createdTo (the format on these last two is yyyy-MM-dd'T'HH:mm:ss.SSS'Z' ). The url would look like this:
http://{ulysescloudURL}/public/api/v1/chain/1/property/3/reservation?arrivalFrom=2018-12-18&arrivalTo=2018-12-18
Filtering by reservations that are pending to arrive today
Using the mentioned filters you can get the pending to arrival reservationRoomStay. Since "pending" is a situation you can ask for the situations in the ReservationSituationType endpoint and then use its id in the Reservation filters. To set an arrival date set arrivalFrom/arrivalTo filters to the same date value. It would look like this:
http://{ulysescloudURL}/public/api/v1/chain/1/property/3/reservation?arrivalFrom=2018-12-18&arrivalTo=2018-12-18&reservationSituationTypeId=4
Filtering by reservations that depart today
To check which reservations are arriving today we use the departureFrom/departureTo filters. These are a range of days, but if we use the same date on both you will get the departures for a single date. Remember that the format is yyyy-MM-dd! That can be applied to arrivalFrom/arrivalTo, stayFrom/stayTo and createdFrom/createdTo (the format on these last two is yyyy-MM-dd'T'HH:mm:ss.SSS'Z' ). The url would look like this:
http://{ulysescloudURL}/public/api/v1/chain/1/property/3/reservation?departureFrom=2018-12-18&departureTo=2018-12-18
Filtering by reservations that are pending to depart today
Since all the reservations that should depart today and haven't done the checkout are in the situation "inHouse" you can ask for the situations in the ReservationSituationType endpoint and then use its id in the Reservation filters. To set a departure date set departureFrom/departureTo filters to the same date value. It would look like this:
http://{ulysescloudURL}/public/api/v1/chain/1/property/3/reservation?departureFrom=2018-12-18&departureTo=2018-12-18&reservationSituationTypeId=3