This API helps you to update maximum nights for specific date ranges for a property. With this feature, you can restrict the availability of a room, by specifying a maximum length of stay if the reservation includes a certain date.
The API can return data in JSON formats. The web service responds to HTTP POST requests.
End Point URL
Header
Parameter
Name | Data Type | Description | Example |
Request_Type * | – | Use Keyword “UpdateMaxNights” | |
HotelCode * | INT(11) | Unique hotel code generated in the system | XXXX |
AuthCode * | VARCHAR(300) | Unique code to enable the interface. | XXXXXXXXXXXXXXXXX |
RatePlanID * | INT(20) | Unique Rate Plan ID | 112500000000000001 |
FromDate * | DATETIME | Update From date. [Format: yyyy-mm-dd] | 2020-06-25 |
ToDate * | DATETIME | Update To date [Format: yyyy-mm-dd] | 2020-07-27 |
MaxNight * | INT(11) | MaxNight value | 2,5,10 etc |
Request
{ "RES_Request": { "Request_Type": "UpdateMaxNights", "Authentication": { "HotelCode": "xxxx", "AuthCode": "xxxxxxxxxxxx" }, "RatePlan": [ { "RatePlanID": "123400000000000001", "FromDate": "2019-06-25", "ToDate": "2019-06-27", "MaxNight": "3" }, { "RatePlanID": "123400000000000006", "FromDate": "2019-06-22", "ToDate": "2019-06-24", "MaxNight": "3" } ] } }
Response
Name | Data Type | Description | Example |
Success.SuccessMsg | – | Generate Success Response Message | Max Nights Successfully Updated |
Errors.ErrorCode | – | Response Error Code | 122, 127 etc |
Errors.ErrorMessage | – | Generate Response Message | MaxNight value is missing |
Success
{ "Success": { "SuccessMsg": " Max Nights Successfully Updated" }, "Errors": { "ErrorCode": "0", "ErrorMessage": "Success" } }
Error Codes
Error Code | Error Name |
100 | Missing required parameters. |
500 | Error occurred during processing |
502 | Request Type is missing |
101 | Hotel Code is missing |
102 | Authentication Code is missing |
105 | From Date is missing |
106 | (From Date) – From Date is not a valid date |
107 | To Date is missing |
108 | (To Date) – To Date is not a valid date |
109 | From Date (From Date) To Date : (To Date) – Please check From and To date. To Date should be greater than fromdate |
301 | Unauthorized Request. Please check hotel code and authentication code |
302 | Unauthorized Request. Integration is not allowed |
303 | Auth Code is inactive. |
201 | Unauthorized request.(Request Type) request is not valid for this hotel code |
202 | Unauthorized request. Hotel code is not active |
122 | Rate Plan ID is missing |
127 | MaxNight value is missing |
128 | Invalid MaxNight value |