System.getChanges | Previo API


DEPRECATED: Please use the function getChanges2

Changes of hotel data

It is important to call Previo API with care. Data gained through the functions Hotel.get or Hotel.getRoomKinds should always be saved in cache or in the database and from here you serve them to your visitors. 

The task of the function System.getChanges is to return the most recent data. Call the function at regular intervalls (15 minutes) and update its data according to instuctions. 

If the element <change> contains the element <hotId>, the function updates data for the hotel with the specified ID. If not, the function updates data for all hotels in Previo. 

It is possible that the function will return the same change of the hotel repetitively in more calls. Therefore you should save the date and time of updates of each hotel (gained from the element <change>). Update only hotels of which the saved date and time are older than in the retrieved element <change>. 

In the output appear elements with different value type than "other". These elements are components of experimental functionality and for now you can ignore them.  

From 28th February 2011: 

Element type is used more. The value of this element now contains name of the function that should be called. After receiving this information about change. 


Name Description
login Username
password Password

Sample request



<changes> [1]  
<change> [0..*]  
<hotId> [0..1] Hotel ID
<type> [1] Type of change
<date> [1] Date and time of change
<other> [0..1] Empty element, ignore it

Type of change

Name Description
other From a historical point of view (stops being supported after some time)

Sample output


This output can be interpreted as the following: Update the capacity of the hotel with ID 556 if the last stored update was made before 2010-03-08T16: 15:45 +01:00 and update the price list of the hotel with ID 561 if the last stored update was made before 2010-03-08T16: 15:45 +01:00.