This API provides a provision to update Room(s) Inventory for the specified date range in any property. You must specify a property’s available inventory based on a room type ID. You can’t specify availability at rate plan level, even if the room type has multiple rates plans.
Example : If room type A is available 10 times, you can’t specify that it can be sold 3 times for rate plan X, and 7 times for rate plan Y. You can only specify the total availability for room type A as 10.
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 “UpdateAvailability” | |
HotelCode * | INT(11) | Unique Hotel code | XXXX |
AuthCode * | VARCHAR(300) | Unique Authentication code | XXXXXXXXXXXXXXXXX |
RoomTypeID * | INT(20) | Unique RoomType ID | 112500000000000001 |
FromDate * | DATETIME | Update From date. | 2020-07-25 |
ToDate * | DATETIME | Update To date [Format: yyyy-mm-dd] | 2020-07-27 |
Availability * | Integer | No. of Inv. Count | 5, 10 , 50 etc |
Request
{ "RES_Request": { "Request_Type": "UpdateAvailability", "Authentication": { "HotelCode": "xxxx", "AuthCode": "xxxxxxxxxxxx" }, "RoomType": [ { "RoomTypeID": "112400000000000002", "FromDate": "2019-06-24", "ToDate": "2019-06-30", "Availability": "9" }, { "RoomTypeID": "112400000000000002", "FromDate": "2019-06-14", "ToDate": "2019-06-20", "Availability": "9" } ] } }
Response
Name | Data Type | Description | Example |
Success.SuccessMsg | – | Generate Success Response | Room Inventory Successfully Updated |
Errors.ErrorCode | – | Response Error Code | 301, 404 etc |
Errors.ErrorMessage | – | Generate Response Message | Update operation is not allowed |
Success
{ "Success": { "SuccessMsg": "Room Inventory Successfully Updated" }, "Errors": { "ErrorCode": "0", "ErrorMessage": "Success" } }
Error
{ "Errors": { "ErrorCode": "301", "ErrorMessage": "Unauthorized Request. Please check hotel code and authentication code" } }
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 |
103 | Room type is missing |
105 | From Date is missing |
106 | (From Date) – From Date is not a valid date |
107 | To Date is missing |
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 |
110 | Inventory value is missing |
111 | Invalid inventory value |
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 |
134 | All Source(s) are using inventory of other source, thefore no update will be allowed. |