This API provides you sales information for rooms for a specific period. 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_sales_report” | |
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 |
from_date * | Date | Start date of calendar information is to be requested Format: YYYY-MM-DD | 2020-06-25 |
to_date * | Date | End date of calendar information is to be requested Format: YYYY-MM-DD | 2020-07-10 |
Request
{ "request_type": "get_sales_report", "body": { "hotel_id": "xxxx", "rooms": [{ "room_id": ["1234500000000000001", "1234500000000000002"], "from_date": "2020-04-25", "to_date": "2020-05-08" }] } }
Response
Name | Data Type | Description | Example |
status | String | Failure or success of the request Values: Success, Error | Success |
data.hotel_id | Integer | ID of Hotel | xxxx |
data.hotel_name | String | Name of Hotel | Hotel Name |
data.Report.* | String | Here * means Room type ID | 1234500000000001 |
data.Report.*.room_name | String | Name of Room | Super Deluxe |
data.Report.*.# | String | Here # means Room Code | L01 |
data.Report.*.#.room_nights | Integer | Total available rooms for the month. | 7 |
data.Report.*.#.room_sold | Integer | No. of room sold only. (not included complimentary) | 5 |
data.Report.*.#.complementary | String | Complimentary | – |
data.Report.*.#.occupancy | Integer | Occupancy of room | 4 |
data.Report.*.#.adr | String | Average Daily rate | 950 |
data.Report.*.#.pax | String | No. of pax in Room | 4 |
data.Report.*.#.room_charges | Long | Room Charges | 85 |
data.Report.*.#.extra_charges | Long | Extra Charged | 4 |
data.Report.*.#.channel | String | Channel name & channel hotel codename_channelHotelCode (Which are mapped with this room type) | Booking.com_11111 |
error_code | – | Error code in case of failure | 105 |
error_message | – | Error Message in case of failure | Invalid Reservation ID |
Success
{ "status": "success", "data": { "hotel_id": "xxxx", "hotel_name": "Hotel Name", "report": [ { "1234500000000000001": { "106": { "room_nights": 14, "room_sold": 0, "complementary": 0, "occupancy": 0, "adr": 0, "pax": 0, "room_charges": 0, "extra_charges": 0, "channel": "" }, "room_name": "Studio" } }, { "1234500000000000002": { "107": { "room_nights": 14, "room_sold": 0, "complementary": 0, "occupancy": 0, "adr": 0, "pax": 0, "room_charges": 0, "extra_charges": 0, "channel": "" }, "111": { "room_nights": 14, "room_sold": 0, "complementary": 0, "occupancy": 0, "adr": 0, "pax": 0, "room_charges": 0, "extra_charges": 0, "channel": "" }, "112": { "room_nights": 14, "room_sold": 0, "complementary": 0, "occupancy": 0, "adr": 0, "pax": 0, "room_charges": 0, "extra_charges": 0, "channel": "" }, "113": { "room_nights": 14, "room_sold": 0, "complementary": 0, "occupancy": 0, "adr": 0, "pax": 0, "room_charges": 0, "extra_charges": 0, "channel": "" }, "room_name": "Double Bedroom Suite" } } ] } }
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 |