API solution no longer usable
Managing photos through OTA_HotelDescriptiveContentNotif, OTA_HotelInvNotif, and OTA_HotelDescriptiveInfo sunsetted on April 1, 2022. Please see the deprecation policy documentation for more details.
This documentation section concerns an API solution that is no longer usable. It will be removed on June 1, 2022. Until then, you can still access it by clicking here
Modify a property's photos¶
Each property has a photo gallery. Use /ota/OTA_HotelDescriptiveContentNotif to modify a property's photos.
New Photo API
This page explains how to modify photos using Content API's "overlay" system. We recommend using our new Photo API instead, as it is RESTful and speaks JSON.
Before you start¶
Overlay
Content API uses an overlay system. Every time you update an existing property, room type, or other object, the body of your request replaces whatever information was stored in our servers at that time. This means existing information may be deleted if you don't include it in your request.
To update an object without deleting information, make sure your request contains both the fields you want to update and those you want to keep the same. Copy/paste sample requests from this page at your own risk.
You need:
Request¶
HTTP request¶
https://supply-xml.booking.com/hotels/ota/OTA_HotelDescriptiveContentNotif
Request body¶
- Provide an OTA_HotelDescriptiveContentNotifRQ object in the request body.
- The photos are in a MultimediaDescriptions element.
- ImageFormat
[@Main="1"]
means the photo is displayed as the property's main photo on Booking.com. - Use ImageTags to specify the things shown in the photo.
Example:
<!-- WARNING: This request overlays existing objects. Copy/pasting may lead to loss of information. -->
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelDescriptiveContentNotifRQ
xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
PrimaryLangID="en-us"
EchoToken="GUID"
xsi:schemaLocation="http://www.opentravel.org/2014B/OTA_HotelDescriptiveContentNotifRQ.xsd"
id="OTA2014B"
Version="8.0"
Target="Production">
<HotelDescriptiveContents>
<HotelDescriptiveContent
HotelCode="{PropertyID}"
HotelDescriptiveContentNotifType="Overlay">
<MultimediaDescriptions>
<MultimediaDescription>
<ImageItems>
<ImageItem>
<ImageFormat Main="1">
<URL>https://pathtoimage/hotelimage001.jpg</URL>
</ImageFormat>
<TPA_Extensions>
<ImageTags>
<ImageTag ID="1"/>
</ImageTags>
</TPA_Extensions>
</ImageItem>
<ImageItem>
<ImageFormat Sort="1">
<URL>https://pathtoimage/hotelimage002.jpg</URL>
</ImageFormat>
</ImageItem>
</ImageItems>
</MultimediaDescription>
</MultimediaDescriptions>
</HotelDescriptiveContent>
</HotelDescriptiveContents>
</OTA_HotelDescriptiveContentNotifRQ>
Response¶
The response contains an OTA_HotelDescriptiveContentNotifRS object:
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelDescriptiveContentNotifRS
xmlns="http://www.opentravel.org/OTA/2003/05"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelDescriptiveContentNotifRS.xsd"
TimeStamp="2018-08-24T14:48:43+00:00"
Target="Production"
Version="3.000">
<Success />
</OTA_HotelDescriptiveContentNotifRS>
<!-- RUID: [UmFuZG9etc] -->
Next steps¶
Asynchronous image processing
Uploaded images take time to process. This means your new
property may have errors later, even if the initial
response was 200 OK
. You can always
check the status of your property's content with /ota/OTA_HotelSummaryNotif
.