Data Updating

The method does allow WuBook to update the hotel rooms data in the channel extranet.

Request from WooDoo

{
"action": "update_data",
"data":{
    "availability": [
          {
          "dfrom": “2015-09-01”,
          "dto": “2015-09-07”,
          "room_id": "2",
          "avail": 2
          }
          ],
     "prices": [
          {
          "dfrom": “YYYY-MM-DD”,
          "dto": “YYYY-MM-DD”,
          "room_id": "2",
          "rate_id": "1",
          "occupancy": “occup_id_2”,
          "price": 90.15,
          }
          ],
     "restrictions": [
           {
           "dfrom": “YYYY-MM-DD”,
           "dto": “YYYY-MM-DD”,
           "room_id": "2",
           "rate_id": "1",
           “closed”: false,
           “cta”: true,
           “ctd”: false,
           “minstay”: 1,
           “maxstay”: 0,
           “minstayarr”: 1,
           }
           ]
      }
}
Field Mandatory Type Description
availability No List List of blocks containing data about availability
room_id No List List of blocks containing data about prices
days No List List of blocks containing data about restrictions
dfrom, dto Yes String Start Date and End Date of the period for which values in the block should be updated. dto is included in the update. Format YYYY-MM-DD.
avail Yes String Room availability
room_id Yes String  
rate_id Yes String  
occupancy No String This field will be specified only if channel manages price per occupancy. It represents the occupancy identifier which the price refers to.

The meaning of restrictions fields (closed, cta, ctd, minstay, maxstay, minstayarr) is the same as described in Data reading. Only restrictions field managed by the Channel will be specified in the update request. Any restriction field can be omitted in the request.The omitted data must remain unchanged on Channel. The update can contain any combination of “availability”, “prices” and “restrictions” blocks.

ROOM-RATE LEVEL AVAILABILITY

If your property model manages availability at room-rate level (it means that for each room the user can set different and independent availability for different rates), the json structure shown above is modified as follows: the “availability” dictionary (object) must contain also the “rate_id” key. For example::

"action": "update_data",
"data":{
    "availability": [
          {
          "dfrom": “2015-09-01”,
          "dto": “2015-09-07”,
          "room_id": "2",
          “rate_id”: “8”
          "avail": 2
          }
...

Response from channel

{
"code": 200
}