.. meta:: :description: Rates List :keywords: Woodooapi Data reading ============ The method allows WuBook to read the hotel rooms data from the channel extranet. This method is used by WuBook before each update call in order to avoid to send any redundant information. The following note could sound obvious, but it is very important to remind that for a certain period after any update,this service returns the same exact values that have previously been updated. Request from WooDoo ------------------- :: “action": "get_data", "data":{ "start_date":"2017-12-01", "end_date":"2017-12-01" } +--------------+-------------+------------+------------------------------------------------------------+ | **Field** | Mandatory | **Type** | **Description** | +==============+=============+============+============================================================+ | start_date | Yes | String | Start date for requested data. Format: "YYYY-MM-DD" | +--------------+-------------+------------+------------------------------------------------------------+ | end_date | Yes | String | End date for requested data. Format: "YYYY-MM-DD". | | | | | Data for the end date should be included in the response.| +--------------+-------------+------------+------------------------------------------------------------+ Response from channel --------------------- :: { "code": 200, "data": { "hotel_id": "100", "rooms": [ { "room_id": "2", "days": { "2017-12-01": { "availability": 5, "rates": [ { "rate_id": "111", "closed": false, "cta": false, "ctd": false, "minstay": 0, "maxstay": 0, "minstayarr": 0, "maxstayarr": 0, "prices": [ { "occupancy": 1, "price": 200.00 }, { "occupancy": 2, "price": 300.00 } ], "price": 300.00 }, { "rate_id": "222", "closed": true, "cta": false, "ctd": false, "minstay": 2, "maxstay": 3, "minstayarr": 2, "maxstayarr": 3, "prices": [ { "occupancy": “occup_id_1”, "price": 150.00 }, { "occupancy": “occup_id_2”, "price": 200.00 } ], "price": 200.00 } ] } } } ] } } +--------------+-------------+-------------+-------------------------------------------------------------------+ | **Field** | Mandatory | **Type** | **Description** | +==============+=============+=============+===================================================================+ | rooms | Yes | List | The list of room's data | +--------------+-------------+-------------+-------------------------------------------------------------------+ | room_id | Yes | String | Room type identifier | +--------------+-------------+-------------+-------------------------------------------------------------------+ | days | Yes | Dictionary | Each dictionary key is a date (yyyy-mm-dd format) whose | | | | (Object) | value is a Dictionary containing data about that day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | availability | No | Integer | The remaining available room for certain day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | rates | Yes | List | The list of rates for certain room for certain day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | rate_id | Yes | String | Rate plan identifier | +--------------+-------------+-------------+-------------------------------------------------------------------+ | closed | No | Boolean | "True" means the room is closed for sale for appropriate | | | | | for certain day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | cta | No | Boolean | Close To Arrival. "true" means the room is closed for the | | | | | arrival for appropriate rate for certain day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | ctd | No | Boolean | Closed To Departure."true" means the room is closed for | | | | | the departure for appropriate rate for certain day | +--------------+-------------+-------------+-------------------------------------------------------------------+ | minstay | No | Integer | The restriction of minimum number of nights. | | | | | 0 (zero) means no restrictions (0 is like 1) | +--------------+-------------+-------------+-------------------------------------------------------------------+ | minstayarr | No | Integer | The restriction of minimum number of nights on arrival. | | | | | 0 (zero) means no restrictions (0 is like 1) | +--------------+-------------+-------------+-------------------------------------------------------------------+ | maxstay | No | Integer | The restriction of maximum number of nights. | | | | | 0 (zero) means no restrictions (0 is like infinite) | +--------------+-------------+-------------+-------------------------------------------------------------------+ | maxstayarr | No | Integer | The restriction of maximum number of nights on arrival. | | | | | 0 (zero) means no restrictions (0 is like infinite) | +--------------+-------------+-------------+-------------------------------------------------------------------+ | prices | No* | List | The list of prices for appropriate rate for each occupancy. | +--------------+-------------+-------------+-------------------------------------------------------------------+ | occupancy | No | String | Identifier of the occupancy, as it is returned in *occupancies* | | | | | field of *get_rooms* service, in the first element of bi-tuples | +--------------+-------------+-------------+-------------------------------------------------------------------+ | price | No* | Float | The price for appropriate rate. | +--------------+-------------+-------------+-------------------------------------------------------------------+ * Only one between “price” and “prices” should be used. Use “prices” if the channel manages all the prices per occupancy. Use “price” if the channel only manages one price per rate. **NOT MANDATORY FIELDS** A missing attribute can have two possible meanings: 1. the attribute is not supported by Channel. In this case WooDoo should be informed about the list of attributes not supported by the Channel. 2. the attribute value has never been set on the Channel that doesn't have a default value,so it is necessary to be set by the Channel manager for the first time. **ROOM-RATE LEVEL AVAILABILITY** If your property model can manage availability at room-rate level (it means that for every room the user can set different and independent availability for different rates), the json structure shown above is modified as follows: the **“availability”** key is moved from must contain also the **“rate_id”** key. For example: :: ... "2014-12-01": { "rates": [ { "availability": 5, "rate_id": "111", "closed": false, "cta": false, "ctd": false, "minstay": 0, "maxstay": 0, "minstayarr": 0, "maxstayarr": 0, "prices": [ { "occupancy": 1, "price": 200.00 }, { "occupancy": 2, "price": 300.00 } ], "price": 300.00 }, ...