This API helps you to populate a stayview calendar with needful information for specific date ranges on your selected rooms. The API can return data in JSON formats. The web service responds to HTTP POST requests.
End Point URL
Note: You need set Authcode in Header.
Header
Parameter
Name | Data Type | Description | Example |
request_type * | VARCHAR(150) | Use Keyword “get_calendar” | |
hotel_id * | INT(11) | Unique Hotel code | XXXX |
room_id * | INT(20) | List of room Ids(If a date range is same for all Room IDs then all Ids will be listed in a single block else separate block will be there for a different date range) | 1234500000000001, 1234500000000002 |
room_code * | INT(20) | List of room codes | “102”, “104”,”108″ |
from_date * | Date | Start date of calendar information is to be requested Format: YYYY-MM-DD | 2020-06-15 |
to_date * | Date | End date of calendar information is to be requested Format: YYYY-MM-DD | 2020-07-15 |
Request
{ "request_type": "get_calendar", "body": { "hotel_id": "xxxx", "rooms": [{ "room_id": ["1234500000000000002", "1234500000000000003"], "room_code": ["107", "111", "112", "113"], "from_date": "2020-04-15", "to_date": "2020-05-15" }, { "room_id": ["1234500000000000007"], "room_code": ["125","126"], "from_date": "2020-04-15", "to_date": "2020-05-15" } ] } }
Response
Name | Data Type | Description | Example |
status | String | Failure or success of the request Values: Success, Error | Success |
data.* | Integer | Here * means Room type ID | 1234500000000001 |
data.*.room_name | String | Name of Room | Super Deluxe |
data.*.room_name.date | Date | Calendar DateFormat: YYYY-MM-DD | 2020-03-01 |
data.*.room_name.status | String | Status of the roomValues : Reserved: If book is BookedBlocked: If sell is stopped for particular reason | Reserved |
data.*.room_name.reservation_info | – | If Room status is blocked then the Value of this Parameter will be blank else if room is booked, then reservation details will be supplied. | – |
data.*.room_name.reservation_info.reservation_id | String | Reservation Id | |
data.*.room_name.reservation_info.channel | String | Channel name & channel hotel code from where a booking has been come in below formatname_channelHotelCode | |
data.*.room_name.reservation_info.guest_name | String | Name of guest | Guest Name |
data.*.room_name.reservation_info.check_in | Date | Date of Check-in | 2020-04-01 12:00:00 |
data.*.room_name.reservation_info.check_out | Date | Date of Check-Our | 2020-05-03 12:00:00 |
error_code | – | Error code in case of failure | 101 |
error_message | – | Error Message in case of failure | Invalid Authentication Data |
Success
{ "status": "success", "data": { "1234500000000000002": { "room_info": "No Booking/Blocks are available for supplied Date Range" }, "1234500000000000003": { "room_info": "No Booking/Blocks are available for supplied Date Range" }, "1234500000000000007": { "room_name": "Stander", "room_info": [ { "room_code": "125", "date": "2020-05-09", "status": "Reserved", "reservation_info": { "folios": { "33": { "Room Charges": "450.0000", "Service Tax": "100.0000", "All in Package [Qty -2.0000]": "300.0000" } }, "reservation_id": "32", "guest_name": "Mam. Daya", "channel": "", "remark": "", "check_in": "2020-05-09 12:00:00", "check_out": "2020-05-10 11:00:00", "booking_status": "Confirmed Reservation", "total_amount": 850, "currency": "INR", "payment_type": "Pay At Hotel" } } ] } } }
Error Codes
Error Code | Error Name |
101 | Invalid Hotel Id |
102 | Invalid Authentication |
103 | Blank Request |
104 | Invalid Request Format |
105 | Missing Required Parameter |
106 | Invalid Reservation ID |
107 | Invalid Date Format |
108 | Invalid Date Range |
109 | Currently Data can be requested for max 15 days |
110 | Invalid Room Id |
111 | IP Address is not Authorised |
112 | Invalid Request Method |
113 | Hotel Code is not Active |
114 | Invalid Room Code or not associated with supplied room ID |
115 | Internal Problem |