Make an online booking or option.

Action name: book

Fields in the json-encoded "data" parameter:

namedescriptionformatrequired
reservation.customercustomer information, see belowObjecttrue
bookingsList of booking information, currently only one booking possible per request, see belowListtrue
action'option' or 'booking'Strue
commissioncommission charged by partner in centsCfalse
extraCommissionInfo about additional third party commissionObjectfalse

 

 

Reservation.customer fields:

namedescription
title 
forename 
surname 
mainAddress.street 
mainAddress.housenumber 
mainAddress.postalcode 
mainAddress.city 
mainAddress.country 
email 
phone 
telcomoffice phone
fax 
mobile 
currency 
preferredLanguageSO 639-1
messageadditional message from guest, will be shown in the inbox

 

 

Booking fields:

namedescription
unitunit id
adults 
children 
babys 
fromyyyy-MM-dd
tillyyyy-MM-dd
servicelineslist of servicelines, see below

 

Serviceline fields:

you can simply use the lines gotten from the "quote prices" response.

 

namedescription
service.id 
amountas Float
pricein cents
discountName 
description 
season 
fromdateyyyy-MM-dd
tilldateyyyy-MM-dd

The total will be calculated as: PRICE * AMOUNT * TIME (e.g. nights). Amount should be empty if not aplicable, for example for rent.

 

extra Commission fields:

 

namedescription
amountin cents
descriptionwho is charging this commission

 

Sample request data:

{"reservation": {         "customer": {             "mainAddress": {                 "country": "DE",                 "street": "Karpendiek 23",                 "postalcode": "23730",                 "city": "Neustadt"             },             "title": "Herr",             "forename": "Jens",             "surname": "Hoff",             "email": "knoffhoff@gmx.de",             "mobile": "56465"         }     },     "action": "booking",     "bookings": [{             "unit": 2351,             "adults": "2",             "children": "1",             "babys": "0",             "from": "2015-10-02",             "till ":"2015-10-07",             "servicelines ":[{                 "service ":{                     "id": 4465 //rent                 },                 "price": 9000,                  "season": "Saison C",                  "fromdate": "2015-10-03",                  "tilldate": "2015-10-08",              }, {                 "service":{                     "id ":4495 //final cleaning                 },                 "price ":6500             }]     }] }

 

Sample response:

As result you will get the reservation id and number, customer id and number and booking id.

{   reservation: {     "id": 612349,     "nr": "19204",     "token": "sdfksdfj...",     "customer": {         "id": 757456,         "nr": "26243"     },     "bookings": [{         "id": 596995     }]  },  ok: true }