Hotel.getMessages

Descriptions and translations

Any function in Previo API returns strings of information (e.g. hotel descriptions or room names) in the default language of the server, which means api.previo.cz in Czech, api.previo.sk in Slovak, etc. 

With this function, you can retrieve all strings in all supported languages at the same time (including default language). 

Code list for messageId

messageId What it does
1 Room type name
2 Room type description
3 Short description of hotel
4 Extensive description of hotel 
5 Room description
6 Reception opening hours
7 Food & beverage
8 Area description
9 Transport accessibility 
10 More information
11 Special events and offers
12 Room name
13 Terms & conditions and cancellation policy 
14 Name of guest category
19 Name of accommodation package
20 Description of accommodation package
21 Notes to accommodation package
22 Text description of what is included in the package

Parameters

Name Description
login Username
password Password
hotId Hotel ID 
languages Exclusion of languages. If left out, the function returns strings in all supported languages

languages

<languages> [0..1]  
 
<language> [1..*] Specify languages by EITHER language ID OR code
 
<lanId> [0..1] Language ID
<code> [0..1] Language code

Sample request

<request>
    <login>prihlasovaci_jmeno</login>
    <password>heslo</password>
    <hotId>4587</hotId>
    <languages>
        <language>
            <code>en</code>
        </language>
        <language>
            <code>de</code>
        </language>
    </languages>
</request>

Output

<messages> [1]  
 
<message> [0..*]  
 
<messageId> [1] String ID (e.g. room name, description...)
<entityId> [1] Entity ID (e.g. room ID, hotel ID...) 
<language> [1]  
 
<lanId> [1] Language ID
<code> [1] Language code
<text> [1] String (translation, description) 
<autoTranslated> [1] The string has been translated automatically (Google Translate) (true / false)

Sample output

<messages>
    <message>
        <messageId>6</messageId>
        <entityId>5</entityId>
        <language>
            <lanId>2</lanId>
            <code>en</code>
        </language>
        <text>Some time to be open from 6 to 5 hours ..... attempt</text>
    </message>
    <message>
        <messageId>6</messageId>
        <entityId>5</entityId>
        <language>
            <lanId>3</lanId>
            <code>de</code>
        </language>
        <text>Einige Zeit von 6 offen zu 5 Stunden ..... Versuch</text>
    </message>
    <message>
        <messageId>1</messageId>
        <entityId>4587</entityId>
        <language>
            <lanId>2</lanId>
            <code>en</code>
        </language>
        <text>Single-bed Room</text>
    </message>
   <message>
        <messageId>1</messageId>
        <entityId>4587</entityId>
        <language>
            <lanId>3</lanId>
            <code>de</code>
        </language>
        <text>Einzeln</text>
    </message>
</messages>

If you compare the sample response with messageId, you can derive the following information:  

Reception opening hours of the hotel with ID 5 in English would be "Some time to be open from 6 to 5 hours ... attempt" and in German "Einige Zeit von 6 offen zu 5 Stunden ... Versuch". 

Name of the guest room with ID 4587 in English would be "Single-bed Room" and in German "Einzeln".