Last updated

Step 2 - Create property details

Use the Property API to create a property.

Prerequisites

You must have a legal entity ID by completing step 1 successfully.

Creating property details

POST
https://supply-xml.booking.com/property-api/properties

Use the property-api endpoint to create a property by specifying the property details such as name, property category, physical location, check in/out time and several other details.

After successfully processing the request, the endpoint returns a property ID.

This tutorial aims to keep it simple. The property you're about to create won't contain many optional fields. Just those necessary to pass the checks. You can add more fields later.

By default, the API creates a fully refundable cancellation policy. In step 6, we use the Policies API to create a non-refundable cancellation policy.

Note down the property ID in the response. You'll need it in the next few steps.

ParameterDescription
> positionContains the geographical coordinates of the property.
>> latitudeSpecifies the latitude coordinates.
>> longitudeSpecifies the longitude coordinates.
> check_inContains the check-in details.
>> fromSpecifies the earliest time a guest can check-in. Accepted values follow the Booking.com Check-In / Check-Out Times format.
>> until[Optional] Specifies the latest time when a guest can check-in. Accepted values follow the Booking.com Check-In / Check-Out Times format.
> check_out[Optional] Contains the check-out details. Specify 24-hour check-out by using 00:00 for both from and until.
>> from[Optional] Specifies the earliest time a guest can check-out. Accepted values follow the Booking.com Check-In / Check-Out Times format.
>> until[Required if check_out > from is specified] Specifies the latest time when a guest can check-out. Required if check_out > from is specified. Accepted values follow the Booking.com Check-In / Check-Out Times format.
> primary_language[Optional] Specifies the language in which the property wants their Booking.com extranet content and communication such as emails, notifications, and so on. Default: en-gb. For a list of supported language codes, see Booking.com Language Code table.
> languages_spoken[Optional] Contains the language(s) spoken at the property. Can contain multiple Language elements. For a list of supported language codes, see Booking.com Language Code table.
> targetSpecifies whether it is a test or production-ready property. Accepts the following values:
- test
- production
Note that once a property is marked as test, it stays as a test property. You cannot convert it to a production-ready property.
> property_nameSpecifies the name of the property on Booking.com. Does not support using CJK Unified Ideographs. See Property naming convention.
> property_category[Either property_category or booking_property_category is required] Specifies the OTA property class type code. Either property_category or booking_property_category is required.
For a list of supported property class type codes, see Property Class Type Code.
> booking_property_category[Either property_category or booking_property_category is required] Specifies the Booking.com property class type code. Either property_category or booking_property_category is required. For a list of supported Booking.com property class type codes, see the Property API Meta Endpoint.
> physical_addressContains the property's physical address.
>> city_nameSpecifies the name of the city, town, or village.
>> country_codeSpecifies the two-letter country code. For more information on how to retrieve the country code details, see xml/countries endpoint.
>> postal_code[Optional] Specifies the postal/zip code. Make sure the zip code (postal_code) is relevant to the country specified in the country_code.
>> address_lineSpecifies the full street name and number. Does not support using CJK Unified Ideographs.
Should not contain abbreviations (such as "Rd." for "Road") and should not exceed 255 characters.
>> display_address[Optional] Specifies whether to hide the full address details from the guest.
- true : Shows the full address to the guest.
- false : Hides the full address from the guest.
> legal_entity_idSpecifies the ID of the legal entity.
> room_countSpecifies the number of sellable units the property offers. A "sellable unit" is the smallest possible space that a guest can book at the property. In a property with 200 rooms, each room is a sellable unit, and the value would be 200.
In a holiday home, guests must typically book the home in its entirety, making the value 1.

Sample request

This request creates a test property because of the attribute "target":"test". For a real property, you must use the value production.

{
  "position": {
    "latitude": 34.397527,
    "longitude": 135.29524
  },
  "check_in": {
    "from": "12:30"
  },
  "check_out": {
    "from": "10:00",
    "until": "10:30"
  },
  "property_name": "Property tutorial test hotel",
  "property_category": 5006,
  "primary_language": "ja",
  "target": "test",
  "languages_spoken": [
    "en-us",
    "th",
    "ko",
    "zh-cn"
  ],
  "physical_address": {
  "city_name": "Osaka",
  "country_code": "JP",
  "postal_code": "598-0046",
  "address_line": "Izumisano",
  "display_address": true
},
  "room_count": 1,
  "legal_entity_id": 14379109
} 

Sample response

A successful response looks as follows:

{
    "data": {
        "property_id": 14795361
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "XXXXXXX-XXXXXXXXX-XXXXXXXXXXXXX-XXXXXXXXXXXXXX"
    }
}