When you run either a hotels / hoteldetail operations, you will receive one of the most valuable content we can offer through the content-api, which is the images tag. Under this tag, you’ll be able to get the information needed to identify and download the picture for a specific hotel.
<images>
<image
path = "00/006808/006808a_hb_f_011.jpg" order = "11" visualOrder = "903">
<type code = "DEP">
<description>Sports and Entertainment</description>
</type>
</image>
<image path="00/006808/006808a_hb_ro_030.jpg" roomCode="DBT.DX" roomType="DBT" characteristicCode="DX" order="30" visualOrder="2">
<type code="HAB">
<description>Room</description>
</type>
</image>
</images>
There are a few things to have in consideration when working with the images:
In order to get the images you will need to add http://photos.hotelbeds.com/giata/
to the path you got from content-api.
Additionally, the images provided are available up to 7 different sizes.
The URLs for the different sizes are:
For each image, an image type will be provided which will add extra information about this photo. The complete list of image types can be downloaded on the following API request: https://api.hotelbeds.com/hotel-content-api/1.0/types/imagetypes
The most common image types are:
For images with imagetype = HAB, you may get a roomcode indicating what room does this picture belong to. In case there’s no roomcode specified, the image is a generic picture for the rooms at the hotel.
The API returns two fields indicating image order (order and visualOrder). Their meaning are:
In the first example, we can get the info about an image for the restaurant of the hotel (Type code = “RES”) and the path were to find this image: 29/290725/290725a_hb_r_001.jpg
<image
path = "29/290725/290725a_hb_r_001.jpg"
order = "1"
visualOrder = "1">
<type code = "RES">
<description>Restaurant</description>
</type>
</image>
Remember you need to add http://photos.hotelbeds.com/giata/ to the path to recover the image. So you can recover the image on http://photos.hotelbeds.com/giata/29/290725/290725a_hb_r_001.jpg
In the next example, we can get the info about an image for a room of the hotel (Type code = “HAB”), which belongs to the room “Room Standard” (roomcode = “ROO.ST”) and the path were to find this image: 29/290725/290725a_hb_ro_037.jpg
<image
path = "29/290725/290725a_hb_ro_037.jpg "
roomCode = "ROO.ST"
roomType = "ROO"
characteristicCode = "ST"
order = "38"
visualOrder = "38">
<type code = "HAB">
<description>Room</description>
</type>
</image>
Remember you need to add http://photos.hotelbeds.com/giata/ to the path to recover the image. So you can recover the image on https://photos.hotelbeds.com/giata/29/290725/290725a_hb_ro_037.jpg