Retrieve/modify galleries

When you upload photos for a property, they don't automatically appear on Booking.com. You must first add them to one of the property's galleries.

Each property has multiple galleries:

  • one main, property-level gallery, with the URL:

    https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery/
  • a room-level gallery for each room type, with the URL:

    https://supply-xml.booking.com/photo-api/properties/{property_id}/rooms/{room_id}/gallery/

The examples on this page only deal with property galleries. Replace the request URL in any example to perform the same operation on a room gallery. Also see the Photo API reference for full details of each endpoint.

You can send requests to either add, remove, or change the order of photos in a gallery, but you can't do them together, in the same request. You can set a main photo in the same request that changes a gallery's order.


HTTP request

GET https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery

Request headers

Header Description Type Required Notes
Authorization Machine account username and password string Required Example: Authorization: Basic {username:password}

Request body

This request has no body. All parameters are specified in the path.

See Photo API reference for details.

Response body

{
  "data": {
    "order": [
      {
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/ALF95NB920ACXLS",
        "name": "originalfilename.jpg",
        "photo_id": "ALF95NB920ACXLS"
      },
      {
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/VN49VL30GLH04J2",
        "name": "originalfilename2.jpg",
        "photo_id": "VN49VL30GLH04J2"
      },
      {
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/9430VNAV32VLDS9",
        "name": "originalfilename3.jpg",
        "photo_id": "9430VNAV32VLDS9"
      }
    ],
    "main_photo": {
      "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/ALF95NB920ACXLS",
      "name": "originalfilename2.jpg",
      "photo_id": "ALF95NB920ACXLS"
    }
  },
  "warnings": [],
  "meta": {
    "next_page": "https://supply-xml.booking.com/photo-api/properties/1234567890/gallery?cursor=UkQAAAAbAAAACcLXKfTV0IWhg0m29bafA229j40dfdmm0RdlrARj8v9okw0OX5LZ2wLCMIbQk7YOTFPsiuGIzyp33JYxxg",
    "ruid": "UmFuZG9tSVYkc2RlIyh9YWFOqyMkTMArT9aWcwl7Ali3zqbWFDnNbiIV1plT0W3msU+6mSlt2MKiAUV732z2Hj9N9KuE5xD4AafO6lluWQM="
  },
  "errors": []
}

See Photo API reference for details.


Insert uploaded photos in a gallery by referring to their photo_id.

HTTP request

POST https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery

Request headers

Header Description Type Required Notes
Authorization Machine account username and password string Required Example: Authorization: Basic {username:password}

Request body

{
  "insert_photos":[
    "7Q1IREzv-P0",
    "8-NjAmvGUuY"
  ]
}

See Photo API reference for details.

Response body

{
    "meta": {
        "ruid": "UmFuZG9tetc"
    },
    "data": {},
    "warnings": [],
    "errors": []
}

See Photo API reference for details.


HTTP request

POST https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery

Request headers

Header Description Type Required Notes
Authorization Machine account username and password string Required Example: Authorization: Basic {username:password}

Request body

{
   "remove_photos":[
      "765432198"
   ]
}

See Photo API reference for details.

Response body

The response will contain all the photos remaining in the gallery.

{
    "meta": {
        "ruid": "UmFuZG9tetc"
    },
    "data": {},
    "warnings": [],
    "errors": []
}

See Photo API reference for details.


HTTP request

POST https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery

Request headers

Header Description Type Required Notes
Authorization Machine account username and password string Required Example: Authorization: Basic {username:password}

Request body

{
  "order":[
    "987654321",
    "654321987",
    "765432198",
    "876543219"
  ]
}

See Photo API reference for details.

Response body

The response contains all the photos in the gallery, in the new order.

{
    "meta": {
        "ruid": "UmFuZG9tetc"
    },
    "data": {},
    "warnings": [],
    "errors": []
}

See Photo API reference for details.


Set main photo

A property can have a main photo, which is displayed more prominently than other photos. The main photo also appears outside the property's main page — in search results, for example. If no main photo is specified, the first photo in the gallery is used as the main photo.

Room galleries don't have a main photo.

HTTP request

POST https://supply-xml.booking.com/photo-api/properties/{property_id}/gallery

Request headers

Header Description Type Required Notes
Authorization Machine account username and password string Required Example: Authorization: Basic {username:password}

Request body

{
   "main_photo": "987654321"
}

See Photo API reference for details.

Response body

{
    "meta": {
        "ruid": "UmFuZG9tetc"
    },
    "data": {},
    "warnings": [],
    "errors": []
}

See Photo API reference for details.