Documentation

Photos / Images

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:

1. URL path

In order to get the images you will need to add http://photos.hotelbeds.com/giata/

to the path you got from content-api.

2. Image sizes

Additionally, the images provided are available up to 7 different sizes.

The URLs for the different sizes are:

3. Image types

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:

  • GEN for General pictures of the hotel
  • HAB for Room pictures
  • RES for Restaurant pictures

4. Room Codes

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.

  • roomCode="DBT.DX" means this image belongs to a Double or Twin Deluxe Room

5. Image Order

The API returns two fields indicating image order (order and visualOrder). Their meaning are:

  • VisualOrder: It determines the display order of all images of a hotel. When this tag is 0 (zero), it indicates that this image is the main one of the hotel (the one to be used as principal). Note: It is possible that you find hotels without this number.
  • Order: It indicates the image order inside the same type of images. E.g.: the image order for hotel entrance, garden, rooms, restaurant, etc.

Examples:

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