Hotel.reservation | Previo API


Create or modify a reservation. 


Name Description
login Username
password Password
commissions Reservation list
resId Reservation ID (only required to edit a reservation) 
styId Package ID if a package is booked (optional)
prpId Partner ID - ID of OTA partner (optional)
gNote Group note - will be set for all reservations in <commissions> (optional)
optionExpiration Expiry option (optional)
lanId Language in which the reservation was created
gCosId Booking status
voucher Identification of the reservation for the client (optional - if left blank, it will be filled from the hotel number series)
approvedPrice Approved price of the reservation - used only for pre-payments (optional)
term Dates of stay
price Reservation price
company Company identification 
contactPerson Contact person identifcation
ipiId ID type of payment (optional) 1 - payment on invoice, 2 - platba od partnera (OTA) 


List of reservations or rooms you wish to reserve

<commission> [1..*]  
<comId> [0..1] Reservation ID of a particular room (only if editing reservations) 
<guests> [0..1] List of guests
<numGuest> [0..1] Total number of guests
<guest> [0..*]  
<gueId> [0..1] Guest ID (if you want to assign existing guest to the reservation)
<name> [0..1] Guest name (DEPRECATED)
<firstName> [0..1] Guest first name
<lastName> [0..1] Guest last name
<guaId> [0..1] Guest category
<meaId> [0..1] Board type ID
<email> [0..1] Guest email address
<phone> [0..1] Guest phone number
<isRecreation> [0..1] If guest should pay recreation tax
<gender> [0..1] Gender (male/female)
<visa> [0..1] Visa number
<numberPlate> [0..1] Licence plate
<obkId> [0..1] Room type (required when creating a new reservation)
<objId> [0..1] Specific room
<cosId> [0..1] Booking status
<note> [0..1] Note


Date of stay

<term> [0..1]  
<from>[1] from
<to>[1] to


Information on price and possibly credit card information

<price> [0..1]  
<total> [0..1] Total amount
<curId> [0..1] Currency ID
<creditCard> [0..1] Credit card information


Company information

<company> [0..1]  
<name> [1] Company name
<idNum> [0..1] Identification number
<vatNumber> [0..1] VAT
<street> [0..1] Street
<city> [0..1] City
<zip> [0..1] Zip code
<couId> [0..1] Country ID


Informace o kontaktní osobě

<contactPerson> [0..1]  
<name> [1] Název of the person
<email> [0..1] Email
<phone> [0..1] Phone number


Credit card information

<creditCard> [0..1]  
<cardType> [1] Credit card type ID (if unknown, set 0)
<ownerName> [1] Cardholder name
<number> [1] Credit card number
<expiryMonth> [1] Month of expiry (1 - 12)
<expiryYear> [1] Year of expiry
<cvvCode> [1] CVV code

Code list for credit card types - Version as of 10th September 2013 (for the current code list use the function System.getCreditCardTypes)

ID Credit card type
1 Visa
2 Visa Electron
3 Maestro
4 EuroCard/MasterCard
5 American Express
6 Diners Club
7 Diners Club Enroute
8 Diners Club Carte Blanche
9 Discover
10 JCB
11 Solo
12 Switch
13 CS
14 CCS
15 Sphere
16 GWC

Sample request

                                     <phone>+420 000 111 222</phone>
             <gNote>Reservation number xxxx from Portal Previo Partner's network</gNote>
                     <from>2013-08-22 14:00:00</from>
                     <to>2013-08-24 10:00:00</to>
                       <ownerName>Petr Klas</ownerName>
                 <name>My Company</name>
                 <street>Paříkova 11a</street> 


The output is the same as of function Hotel.searchReservations. We recommend saving the retrieved output <resId> and <comId> in case you wish to edit reservations via API. 


When creating a reservation, call a function without the parameters <resId> and <comId>. The system returns information on how the reservation was saved and the reservation ID (resId) and ID of each booked room (comId). For further editing of the reservation, send the exact same request as when creating a new reservation, only with changed information and filled in parameters resId and comId. If you change global parameters of the reservation (price, status, date, voucher), we recommended to completely leave out the element <commission>. 

In case the hotel has no available space in the requested time period, the system will not allow to send the reservation and will return an error message "Insufficient capacity". If you want to send the reservation despite,  set the reservation status gCosId to 6 (waiting list). In this case the client should be informed that he is getting only a provisional booking and that the hotel is NOT OBLIGED TO ACCOMMODATE THE GUEST.