Hotel.searchReservations | Previo API

Hotel.searchReservations

Returns a list of all reservations of current in-house guests for a specific time period or specific reservation. 

Always use the parameter "limit" when you search by parameter "fulltext". If this parameter is not set or if it is greater than 300, the function will return 300 results.

Parameters

Name Description
login Username
password Password
hotId Hotel ID
term Time period
comIds State ID
fulltext Search reservations by text - the function search in name, e-mail, phone number of the quest, voucher number and company name and e-mail
statuses Returns only reservations with demanded statuses - if not set, function searchs in this statuses: confirmed, , option, checked-in, checked-out, other
limit Limit to the number of results - only when searching by fulltext (if not provided or higher then 300, first 300 results will be returned)
resId Reservation ID

term

Returns reservations for the specified time period.

When using this parameter, the function only returns reservations that are visible on the reservation grid (e.g.: option, confirmation, etc). 

Insert dates in W3 date format. Example:  2010-04-29

<term> [1]  
 
<from> [1] from (date)
<to> [1] to (date)
<termType> [0..1]

Type of the searching term - allowed values:

  • created (search in date of creation)
  • check-in (search in date of check-in)
  • check-out (search in date of chec-out)
  • overlap (search reservations which overlap requested term)
  • modified (search in date of last change)

If not set, function use overlap method.

comIds

Returns the reservation for the specified reservation ID. 

If this value is specified, the function ignores the specified date. Function also lists reservations which might not be visible on the reservation grid (e.g.: waiting list, etc...). 

<comIds> [1]  
 
<comId> [1..*] Reservation ID

statuses

If set, function search only reservations with given status(es).

<statuses> [0..1]  
 
<cosId> [1..*] Identificator of reservation status

Sample request

<request>
	<login>prihlasovaci_jmeno</login>
	<password>heslo</password>
	<hotId>745896</hotId>
	<term>
	    <from>2010-01-01</from>
	    <to>2010-12-31</to>
	</term>
	<comIds>
	    <comId>55565445</comId>
	</comIds>
    <fulltext>John Doe</fulltext>   
    <statuses>
        <cosId>1</cosId>
        <cosId>2</cosId> 
    </statuses> 
    <limit>
        <offset>100</offset>
        <limit>200</limit>
    </limit>
</request>

Output

Root element - reservations

<reservations> [1]  
 
<reservation> [0..*] Represents one reservation

reservation

<reservation> [0..*] If the hotel does not have any reservations for the specified time period, the function will not return anything. 
 
<comId> [1] Reservation ID
<resId> [1] Potential group booking ID
<voucher> [1] Voucher number (string)
<term> [1] Date of stay
 
<from> [0..1] from
<to> [0..1] to
<created> [1] Booking date
<cancellationDate> [0..1] Cancellation date (in case, the reservation is cancelled or commission status = NO_SHOW)
<status> [1]  
 
<statusId> [1] Booking status
<optionExpiration> [0..1] Expiry of optional booking
<price> [1] Total price
<currency> [1] Currency
 
<curId> [1] Currency ID
<code> [1] Currency code
<guest> [0..*] Guest who is part of the reservation 
 
<gueId> [1] Guest ID
<name> [0..1] Guest name (DEPRECATED) - složeno z <firstName>, <lastName>
<firstName> [0..1] Guest first name
<lastName> [0..1] Guest last name
<phone> [0..1] Guest phone number
<email> [0..1] Guest email address
<address> [0..1] Guest postal address  (DEPRECATED) - composed from <street>, <streetNumber>, <zip>, <city>
<street> [0..1] Guest street
<streetNumber> [0..1] Guest street number
<zip> [0..1] Guest ZIP code
<city> [0..1] Guest city
<countryCode> [0..1] ISO country code of guest's home country (default CZE)
<guestCategory> [1]  
 
<guaId> [1] Guest category ID
<name> [1] Guest category name as completed in Previo
<localVisitorTax> [1] Whether the given category pays recreation fees
<discount> [0..1] Discount for category
<birthDate> [1] Date of birth
<identity> [0..1]  
 
<idNumber> [1] ID card / passport / NI number / permanent residence number
<guiId> [1] Document type (1 - Identity card, 2 - passport, 3 - driving licence, 4 -permanent residence)
<company> [0..1] Company
 
<name> [1] Name
<address> [0..1] Address
<ic> [0..1] Company identification number
<dic> [0..1] Company tax number
<contactPersonName> [0..1] Name of contact person
<contactPersonPhone> [0..1] Telephone number of contact person
<contactPersonEmail> [0..1] Email address of contact person 
<contactPerson> [0..1] Information about the person, who made a booking
 
<name> [0..1] Name
<email> [0..1] Email
<phone> [0..1] Phone number
<object> [1] Room for which the reservation was made
 
<objId> [1] Room ID
<name> [0..1] Room name
<objectKind> [1] Room type for which the reservation was made
 
<obkId> [1] Room type ID
<name> [1] Room type name
<note> [0..1] Reservation note
<gNote> [0..1] Potential note to group reservations
<partner> [0..1] Name of the partner who created the reservation
 
<prpId> [1] Id of the partner
<name> [1] Name of the partner

Sample output

<reservations>
    <reservation>
        <comId>1</comId>
        <term>
            <from>2010-01-01 14:00:00</from>
            <to>2010-01-10 10:00:00</to>
        </term>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
        <price>2569</price>
        <guest>
            <gueId>1</gueId>
            <firstName>John</firstName>
            <lastName>Black</lastName> 
            <phone>+0420111111111</phone>
            <email>jiri@novak.tm</email>
            <address>Nováka 4</address>
        </guest>
        <object>
            <objId>1</objId>
            <name>101 - S</name>
        </object>
        <objectKind>
            <obkId>1</obkId>
            <name>Single Room</name>
        </objectKind>
    </reservation>
    <reservation>
        <comId>2</comId>
        <term>
            <from>2010-05-10 14:00:00</from>
            <to>2010-05-14 10:00:00</to>
        </term>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
        <price>5879</price>
        <guest>
            <gueId>2</gueId>
            <firstName>Peter</firstName>
            <lastName>Black</lastName>  
        </guest>
        <guest>
            <gueId>2</gueId>
        </guest>
        <object>
            <objId>3</objId>
            <name>201</name>
        </object>
        <objectKind>
            <obkId>2</obkId>
            <name>Double Room</name>
        </objectKind>
    </reservation>
    <reservation>
        <comId>3</comId>
        <term>
            <from>2010-09-02 14:00:00</from>
            <to>2010-09-11 10:00:00</to>
        </term>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
        <price>3657</price>
        <guest>
            <gueId>4</gueId>
            <firstName>Rebeca</firstName>
            <lastName>Black</lastName>  
        </guest>
        <object>
            <objId>3</objId>
            <name>103 - S</name>
        </object>
        <objectKind>
            <obkId>1</obkId>
            <name>Single Room</name>
        </objectKind>
    </reservation>
    <reservation>
        <comId>6</comId>
        <term>
            <from>2010-10-02 14:00:00</from>
            <to>2010-10-07 10:00:00</to>
        </term>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
        <price>1567</price>
        <guest>
            <gueId>6</gueId>
        </guest>
        <object>
            <objId>1</objId>
            <name>101 - S</name>
        </object>
        <objectKind>
            <obkId>1</obkId>
            <name>Single Room</name>
        </objectKind>
    </reservation>
</reservations>