Documentation

Workflows

The CacheAPI – Files Service has two different possibilities to get all the information and manage the updates.

The first one consists in always retrieving all the files HotelBeds has for you. In this scenario, the update process is quite simple, remove all your data and overwrite with the newly generated files.

  • Advantages:
     Simply update workflow
     Only one operation implementation
     Easy to restore the data after error in the process
  • Disadvantages:
    Higher size for the downloads
    Process of all the files, even if there are no changes

On the other hand, you can retrieve all the files the first time you use the service and after that, manage only the updated information with update requests.

  • Advantages:
     Only process the changed files
     Lower size for the downloads
  • Disadvantages:
    More complex workflow
    Three operations implementation





Retrieve all the files

cacheapi_full_workflow

This workflow process starts with the FULL request operation from your system to the web service. The credentials are sent inside the HTTP headers.
The HTTP response contains a .zip file with all the files we have generated according to your product set up.
After that you have to unzip the .zip file and process all the single files corresponding to our contract information. 

In order to get the updated information, then you have to start again the process, but overwriting the data you have processed with the new files.
At this point, you can implement a compare process to detect the changes or simply remove and create again the data into your system.





Managing only updates

cacheapi_update_workflow

This workflow process starts with the FULL request operation from your system to the web service. The credentials are sent inside the HTTP headers. 

The HTTP response contains a .zip file with all the files we have generated according to your product set up and the unique version number of the files.
After that you have to unzip the .zip file and process all the single files corresponding to our contract information. 

Once you have processed the information, you have to confirm to our service the current version of the files you have successfully managed, and provided in our response. This can be done with the Confirm Version operation, just by sending an HTTP request to that REST resource. 

With this confirmation, our system fixes the current version successfully managed by your system. 

Whenever you want updated information, you only have to send the HTTP request for the Update REST resource. Our system will provide you a .zip file with the information which has been modified since the last version you have confirmed in the previous step. Each new version will be composed of a set of files, a unique file per contract. At update requests, each update will produce a unique set of files. 

After the process of the updated files, remember to start again the confirmation version process. 

Updates can be done one time every hour as maximum.





Add or remove destinations

In order to add or remove destinations, please contact your Support Agent.