Last updated

Step 2 – Retrieve property details →


Step 1 – Create property

You are ready to create your first property. This is one of the most essential API calls you'll make – and one of the more complex. The call results in the creation of a property "skeleton" that will eventually contain a property's contact details, fee policies, and much more.

But let's keep it simple. The property you're about to create won't contain too many fields – just those necessary to pass checks. You can add more fields later.

Each property must have at least one cancellation policy

When creating a property using the OTA_HotelDescriptiveContentNotif endpoint, if you do not specify the policy details, the API creates a fully-flexible policy (PolicyCode=152) as the default policy for the property.

Property contact information

Let's start with the basics. Each property's contact information must include:

  • a physical address;
  • a general contact person;
  • an invoicing address.

Send a new request with this method and URL:

POST https://supply-xml.booking.com/hotels/ota/OTA_HotelDescriptiveContentNotif

There's a sample request below. It contains a few {PlaceHolders} you need to replace:

PlaceholderDescription
{LegalEntityID}The ID of a legal entity to which you have access. The property you create will belong to this legal entity.
{CityName}, {PostalCode}A city and postal code valid for the specified {CountryCode}.
{CountryCode}The two-letter code for a country in which you have permission to create a property. This depends on your contract with Booking.com.
{Latitude}, {Longitude}The geographical latitude and longitude for your property. Example: <Position Latitude="52.365686" Longitude="4.898508" />
{PropertyType}The Property Class Type Code representing the type of property (such as an apartment or hotel).

Sample request

This request creates a test property. It's a test property because of the attribute OTA_HotelDescriptiveContentNotifRQ[@Target="Test"]. For a real property, you would use Production instead of Test.

<?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="Test">
  <HotelDescriptiveContents>
    <HotelDescriptiveContent
      HotelName="The Best Hotel"
      LanguageCode="en"
      HotelDescriptiveContentNotifType="New">
      <ContactInfos>
        <ContactInfo ContactProfileType="PhysicalLocation">
          <Addresses>
            <Address>
              <AddressLine>1 Street Name</AddressLine>
              <!-- Replace the {PlaceHolders} in the following lines! -->
              <CityName>{CityName}</CityName>
              <PostalCode>{PostalCode}</PostalCode>
              <CountryName>{CountryCode}</CountryName>
            </Address>
          </Addresses>
        </ContactInfo>
        <ContactInfo ContactProfileType="general">
          <Names>
            <Name Language="en">
              <GivenName>Sam</GivenName>
              <Surname>Xu</Surname>
            </Name>
          </Names>
          <Emails>
            <Email>noreply@booking.com</Email>
          </Emails>
          <Phones>
            <Phone PhoneNumber="+31666666666" PhoneTechType="1" Extension="30" />
          </Phones>
        </ContactInfo>
        <ContactInfo ContactProfileType="invoices">
          <Names>
            <Name Language="en">
              <GivenName>Sam</GivenName>
              <Surname>Xu</Surname>
            </Name>
          </Names>
          <Addresses>
            <Address>
              <AddressLine>Herengracht 597</AddressLine>
              <CityName>Amsterdam</CityName>
              <PostalCode>1017 CE</PostalCode>
              <StateProv StateCode="NH" />
              <CountryName>nl</CountryName>
            </Address>
          </Addresses>
          <Phones>
            <Phone PhoneNumber="+31666666666" PhoneTechType="1" Extension="30" />
          </Phones>
        </ContactInfo>
      </ContactInfos>
      <HotelInfo>
        <CategoryCodes>
          <GuestRoomInfo Quantity="10" />
          <!-- Replace the {PlaceHolder} in the following line! -->
          <HotelCategory ExistsCode="1" Code="{PropertyType}" />
        </CategoryCodes>
        <!-- Replace the {PlaceHolder} in the following line! -->
        <Position Latitude="{Latitude}" Longitude="{Longitude}" />
        <OwnershipManagementInfos>
          <OwnershipManagementInfo>
            <!-- Replace the {PlaceHolder} in the following line! -->
            <CompanyName Code="{LegalEntityID}" />
          </OwnershipManagementInfo>
        </OwnershipManagementInfos>
      </HotelInfo>
    </HotelDescriptiveContent>
  </HotelDescriptiveContents>
</OTA_HotelDescriptiveContentNotifRQ>

Sample response

It can take around 30 seconds to get a response if your request has a large body. A successful response looks like this:

<?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-02-07T10:42:02+00:00" Target="Test" Version="3.000">
    <UniqueID Type="10" ID="1234567" />
    <Success />
</OTA_HotelDescriptiveContentNotifRS>
<!-- RUID: [UmFuZG9tSVY...] -->

Take a note of the value of UniqueID[@ID]. This is the unique ID we assigned to your property. You'll need it for further operations.

To learn more

Learn more about the last call here: OTA_HotelDescriptiveContentNotif.

Add basic policies and services

You have created a new property with the default fully-flexible cancellation policy. However, you can add other policies for check-ins and cancellations. While you're at it, you'll also add information about a basic service.

The Partner Supply API works with an "overlay" system. In short, this means that, to add a field to an existing property, you must send the new field and all the fields you sent earlier.

Repeat your previous request, but make these changes:

  1. Add the attribute HotelDescriptiveContent[@HotelCode] and set its value to the property ID from the last response.
  2. Change the value of [@HotelDescriptiveContentNotifType] from New to Overlay.
  3. Inside HotelInfo, add a Services object specifying that the property offers non-smoking rooms (Hotel Amenity Code 198).
  4. At the same level as HotelInfo, add a Policies object.
  5. Inside the Policies object, add a cancellation policy which dictates that guests must pay the full amount if they cancel less than 42 days in advance (Book.com Cancellation Policy Code 12).

Here's an excerpt that shows only the changed elements:

<!-- Skipping unchanged lines. -->
  <HotelDescriptiveContent
    HotelCode="{PropertyID}"
    HotelName="The Best Hotel"
    LanguageCode="en"
    HotelDescriptiveContentNotifType="Overlay">
<!-- Skipping more unchanged lines. -->
     <HotelInfo>       
       <Services>
         <Service Code="198" />
       </Services>
<!-- Skipping yet more unchanged lines. -->
     </HotelInfo>
     <Policies>
      <Policy>
        <PolicyInfo CheckInTime="15:00-20:00" CheckOutTime="12:00" />
        <CancelPolicy>
          <CancelPenalty PolicyCode="12" />
        </CancelPolicy>
        <GuaranteePaymentPolicy>
          <GuaranteePayment PolicyCode="12" />
        </GuaranteePaymentPolicy>
      </Policy>
     </Policies>
<!-- End of excerpt. -->

A successful response will merely say Success, like this:

<?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-02-07T13:20:47+00:00" Target="Test" Version="3.000">
    <Success />
</OTA_HotelDescriptiveContentNotifRS>
<!-- RUID: [UmFuZG9tSV...] -->
To learn more

To learn more about the last call, see OTA_HotelDescriptiveContentNotif.

Step 2 – Retrieve property details →