Retrieve photos

After a queued photo finishes uploading, you can use the /photos endpoint to retrieve its metadata. You can then use this data to arrange photos in galleries.


Retrieve photo metadata

HTTP request

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

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": {
    "name": "original_125772783.jpg",
    "photo_id": "8-NjAmvGUuY",
    "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/8-NjAmvGUuY",
    "sample": "https://example.com/8ef/8ef267492f453018befb28391c641bb0c993ef32.jpg",
    "height": 960,
    "width": 1440,
    "tags": [],
    "in_property_gallery": {
      "property_id": 1234567890,
      "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/gallery"
    },
    "in_room_galleries": [
      {
        "room_id": 123456789002,
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/rooms/123456789002/gallery"
      }
    ]
  },
  "meta": {
    "ruid": "UmFuZG9tSVYkc2RlIyh9YWFOqyMkTMAreuCQEh5uXaBtUCNfQh5H7s59v9v3HswKuMitZoGvAfLlPYkWtW3ohDrMvfLJAzlLeBZ1LKUVBNo="
  },
  "errors": [],
  "warnings": []
}

See Photo API reference for details.


Retrieve metadata of all photos

HTTP request

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

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": {
    "photos": [
      {
        "photo_id": "7Q1IREzv-P0",
        "name": "original_125772780.jpg",
        "width": 1440,
        "height": 960,
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/7Q1IREzv-P0",
        "sample": "https://example.com/path/max500_watermarked_standard/e77/e7742a01c8a3a8a038b7e0ada1b597124800ab94.jpg",
        "tags": [],
        "in_property_gallery": null,
        "in_room_galleries": [
          {
            "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/rooms/123456789002/gallery",
            "room_id": 123456789002
          }
        ]
      },
      {
        "photo_id": "8-NjAmvGUuY",
        "name": "original_125772783.jpg",
        "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos/8-NjAmvGUuY",
        "sample": "https://example.com/path/max500_watermarked_standard/8ee/8ee267492f453018befb28391c641bb0c993ef35.jpg",
        "width": 1440,
        "height": 960,
        "tags": [],
        "in_property_gallery": {
          "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/gallery",
          "property_id": 1234567890
        },
        "in_room_galleries": [
          {
            "room_id": 123456789002,
            "url": "https://supply-xml.booking.com/photo-api/properties/1234567890/rooms/123456789002/gallery"
          }
        ]
      }
    ]
  },
  "meta": {
    "next_page": "https://supply-xml.booking.com/photo-api/properties/1234567890/photos?cursor=UkQAAAAbAAAAAaA7-M_WOjCg6wlbfvCIE_CziAcfTvH0MrsgzDpyR2t3byjFFeUTTzt5aoulwH6sU9LzvqKf44TE2wLHDw",
    "ruid": "UmFuZG9tSVYkc2RlIyh9YWFOqyMkTMArQ8j4RHj1y73YowTqnhZhQ5lSBWXHp+al1oKXqiHL37AvlKkYfdGJAW7o+oaoEKqk+uM5C9HPPn0="
  },
  "warnings": [],
  "errors": []
}

See Photo API reference for details.