Update a online booking or option.

Right now, you can only add services and update Guests. Once you update a booking or option, the status will automatically become "CONFIRMED".

Action name: updateBooking

Fields in the json-encoded "data" parameter:

tokenbooking token generated by vOfficeStrue
bookingsupdated bookings, this set consists of the booking ids as the keys and the updates as the value, see belowSETtrue
noStatusChangeleave the booking-status unchangedB 


Mapped bookings value:

addedServicelinessee online booking for detailsLISTfalse
addedGuests LISTfalse
changedGuestsyou can only update the birthdateLISTfalse
removedGuests LISTfalse


Sample request data:

{"bookings":{       "710560":{          "addedServicelines":[             {                "service":{                   "id":480                },                "price":1000,                "amount":1,                "total":1000             }          ]       }    },    "token":"eyJhbGciOiJ..." }


Sample response:

As result you will get the reservation status:

{    "reservation":{       "nr":"20599",       "paid":0,       "outstanding":49600,       "total":50600,       "id":726544,       "paymentSchedule":{          "total":{             "date":"2015-11-14",             "amount":37200          }       }    },    "ok":true }


Sample request data for updating guests:

{"bookings":{       "710560":{         addedGuests:[             { // enter a known contact as guest:                 id: 34343              },             { // or create a new contact:                 surname: 'Doe',                 forename: 'John',                 birthdate: '1984-01-01'             }         ],         removedGuests: [             {                 guestId: 234234             }         ],         changedGuests: [             {                 guestId: 234235,                 birthdate: '1984-01-01'                 }         ]       }    },    "token":"eyJhbGciOiJ..." }