Hotel.getGuests | Previo API

Hotel.getGuests

Search the hotel guests

Always use the parameter "limit". If this parameter is not set, the function will return 100 results. If you set a limit greater than 100, the function will return 100 results.  

Parametry

Název Popis
login Username
password Password
hotId Hotel ID
filter Filter
order Result order
limit Limit to the number of results

filter

Example: Search Guest by surname

<filter>
    <like>
        <field>name</field>
        <value>%Doe</value>
    </like>
</filter>

Other allowed values in filter field:

  • fulltext - search in name, email and address
  • name - guest name
  • email - guest email
  • country - guest country (searching by countryID, see System.getCountries)

Sample reguest

<request>
    <login>prihlasovaci_jmeno</login>
    <password>heslo</password>
    <order>
        <by>name</by>
        <desc>false</desc>
    </order>
    <limit>
        <offset>100</offset>
        <limit>100</limit>
    </limit>
</request>

 

Output

<guests> [1]  
 
<foundRows> [1] Number of guests without limit  
<guest> [0..*] Detailed information about guests  
  <gueId> [1] Guest ID
  <guaId> [1] Guest category ID
  <guiId> [0..1] Identification type ID (driving license, passport, ID)
  <name> [0..1] Name (DEPRECATED) - composed from <firstName>, <lastName>
  <firstName> [0..1] First name
  <lastName> [0..1] Last name
  <sex> [0..1] Sex
  <identity> [0..1] Passport / driving license / ID number
  <birthday> [0..1] Birthday
  <address> [0..1] Address (DEPRECATED) - composed from <street>, <streetNumber>, <zip>, <city>
  <street> [0..1] Street
  <streetNumber[0..1] House number
  <zip> [0..1] ZIP code
  <city> [0..1] City
  <phone> [0..1] Phone
  <email> [0..1] Email
  <visa> [0..1] Visa number
  <numberplate> [0..1] Numberplate
  <note> [0..1] Note
  <couId> [0..1] Country ID
  <newsletter> [0..1] Has allowed newsletter?

Sample response

<guests>
    <foundRows>1356</foundRows>
    <guest>
    	<gueId>478</gueId>
        <guaId>160</guaId>
        <guiId>1</guiId>
        <name>Petr Klas</name>
        <firstName>Petr</firstName>
        <lastName>Klas</lastName>  
        <sex>m</sex>
    	<identity>866876</identity> 
        <birthday>1999-01-01</birthday>
        <email>petr@buchalcev.cz</email>
        <couId>507</couId>
    	<newsletter>1</newsletter> 
    </guest>
    <guest>
        <gueId>34528406</gueId>
        <guaId>14372</guaId>
        <guiId>1</guiId>
        <email>tomas.holy@previo.cz</email>
        <couId>1</couId>
    </guest>
</guests>