We’ve added the following two new query parameters to the GET/reservations and GET/reservations/summary APIs:
- from_date description: The first date (YYYY-MM-DD) for which to fetch data; it can only be combined with date_filter, not date or date_operator.
- to_date description: The end date (YYYY-MM-DD) for which to fetch data; it may be the same date as from_date and a maximum of +30 days. to_date can only be combined with date_filter, not date or date_operator.
The GET API calls will behave the following way:
- from_date: 2023-09-07
- to_date: 2023-09-10
- date_filter: one of arrival, departure, created, updated — default: arrival
- Reservations arriving, departing, created or updated on the from_date to to_date are to be returned in the response depending on the date_filter applied.
- A maximum of 30 consecutive nights can be applied in the call. If users apply more or equal to 31 nights, Stayntouch PMS will return the following error message: “422 — too many dates selected in the date range.”
- From_date and to_date can be in the past, present, and future.
- If vendors use an incorrect combination of parameters, Stayntouch will display the following error message: “Incorrect parameter combination used.”
- The only parameter that is allowed to combine is from_date + date_filter.