# 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


```http
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](/connectivity/docs/policies-api/managing-policies) to create a non-refundable cancellation policy.

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

| Parameter | Description |
|  --- | --- |
| **>**  `position` | Contains the geographical coordinates of the property. |
| **>>** `latitude` | Specifies the latitude coordinates. |
| **>>** `longitude` | Specifies the longitude coordinates. |
| **>** `check_in` | Contains the check-in details. |
| **>>** `from` | Specifies the earliest time a guest can check-in. Accepted values follow the [Booking.com Check-In / Check-Out Times format](/connectivity/docs/codes-bcio). |
| **>>** `until` | [Optional] Specifies the latest time when a guest can check-in. Accepted values follow the [Booking.com Check-In / Check-Out Times format](/connectivity/docs/codes-bcio). |
| **>** `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](/connectivity/docs/codes-bcio). |
| **>>** `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](/connectivity/docs/codes-bcio). |
| **>** `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.](/connectivity/docs/codes-bcl) |
| **>** `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.](/connectivity/docs/codes-bcl) |
| **>** `target` | Specifies 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_name` | Specifies the name of the property on Booking.com. Does not support using [CJK Unified Ideographs.](https://en.wikipedia.org/wiki/CJK_Unified_Ideographs) See  [Property naming convention.](/connectivity/docs/property-api/implementing-property-api-ga#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.](/connectivity/docs/codes-pct) |
| **>** `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.](/connectivity/docs/property-api/property-api-meta-endpoint) |
| **>**  `physical_address` | Contains the property's physical address. |
| **>>** `city_name` | Specifies the name of the city, town, or village. |
| **>>** `country_code` | Specifies the two-letter country code. For more information on how to retrieve the country code details, see [`xml/countries` endpoint.](/connectivity/docs/b_xml-countries) |
| **>>** `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_line` | Specifies the full street name and number. Does not support using [CJK Unified Ideographs.](https://en.wikipedia.org/wiki/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_id` | Specifies the ID of the [legal entity](/connectivity/docs/glossary_of_terms#legal-entity-id). |
| **>** `room_count` | Specifies 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`.


```json
{
  "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:


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