Update Max Nights

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

Content-Type: application/json

Parameter

NameData TypeDescriptionExample
Request_Type *Use Keyword “UpdateMaxNights”
HotelCode *INT(11)Unique hotel code generated in the systemXXXX
AuthCode *VARCHAR(300)Unique code to enable the interface.XXXXXXXXXXXXXXXXX
RatePlanID *INT(20)Unique Rate Plan ID112500000000000001
FromDate *DATETIMEUpdate From date. [Format: yyyy-mm-dd]2020-06-25
ToDate *DATETIMEUpdate To date [Format: yyyy-mm-dd]2020-07-27
MaxNight *INT(11)MaxNight value2,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

NameData TypeDescriptionExample
Success.SuccessMsgGenerate Success Response MessageMax Nights Successfully Updated
Errors.ErrorCodeResponse Error Code122, 127 etc
Errors.ErrorMessageGenerate Response MessageMaxNight value is missing

Success

 {    "Success": {
        "SuccessMsg": " Max Nights Successfully Updated"
    },
    "Errors": {
        "ErrorCode": "0",
        "ErrorMessage": "Success"
    }
}

Error Codes

Error CodeError Name
100Missing required parameters.
500Error occurred during processing
502Request Type is missing
101Hotel Code is missing
102Authentication Code is missing
105From Date is missing
106(From Date) – From Date is not a valid date
107To Date is missing
108(To Date) – To Date is not a valid date
109From Date (From Date) To Date : (To Date) – Please check From and To date. To Date should be greater than fromdate
301Unauthorized Request. Please check hotel code and authentication code
302Unauthorized Request. Integration is not allowed
303Auth Code is inactive.
201Unauthorized request.(Request Type) request is not valid for this hotel code
202Unauthorized request. Hotel code is not active
122Rate Plan ID is missing
127MaxNight value is missing
128Invalid MaxNight value

Click here to Register