System.getChanges2 | Previo API


Changes in hotel data with differentiation between types of changes. 

The function only returns changes that have occured since the last synchronisation (calling the API function) of the relevant data from Previo. 

It is important to call Previo API functions with wisdom. For example, you should always save data gained through the functions Hotel.get or Hotel.getRoomKinds into cache or in the database and from here you return it to your website visitors. 

The task of the function System.getChanges2 is to return the most recent data. Call the function at regular intervalls (5 - 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. 

Limitations to the returned number of changes

The function returns a maximum of 100 changes in one call. One type of change (e.g. change in the price list) is always specified for each hotel once with the date of the last change. If you don't call API function which returns the data which has been changed, you won't have further changes in the queue (you will always be returned the same 100 changes).

Example: The price of hotel with hotId 1 changes, and information about this change will get in the queue. After that will come 99 reviews, each for different hotels. And the last will be the change of the description of the hotel with hotId 2. There will be 100 changes in the queue for you (but in total there are 101 changes) and until you call API function that returns price lists (getRates) or API function which returns reviews for some of those 99 hotels, you will not find out about the change in description or hotId2. 

Change as of 2nd January 2012:

Function was returning changes for which the user did not have permission. This was necessary to call functions for updates and thus receive incorrect replies. Now the function only returns changes to which the user has permission. 

Optional parameter changes are now available, which allows you to call only changes of a specific type. 


Name Description
login Username
password Password
changes [0..1]  
<change> [0..*] Name of requested change

Sample request



<changes2> [1]  
<change> [0..*]  
<hotId> [0..1] Hotel ID
<type> [1] Type of change

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 and update the price list of the hotel with ID 561.