Skip to content

Create unit

Request

Create new unit for a property

Path
property-idinteger, (int32)required
Bodyapplication/jsonrequired
configurationobject(Configuration)required
unit_name_idinteger, (int32)required
  • The list of available unit names can be found in meta (see $.unit_names)
number_of_unitsinteger, (int32)

Number of units must be between 0 and 32000

Default:1
smoking_policystring
Default:"SMOKING_AND_NONSMOKING"
Enum:"SMOKING""NONSMOKING""SMOKING_AND_NONSMOKING"
sizeobject(Size)
partner_reference_namestring

Internal room name, visible only in API and Extranet

floor_numbers_located_onArray of integers

One or more floors where the unit is located; 0 is a ground floor

occupancy_detailsobject(OccupancyDetailsCreate)
extra_beds_configurationobject(ExtraBedsConfigurationCreate)

Extra bed & crib options

occupancyobject(OccupancyCreate)deprecated
max_children_that_pay_children_rateinteger, (int32), [ 0 .. 49 ]deprecated

This field will be deprecated on 29 June 2026 and sunset on 7 July 2026. Booking.com will ignore this field after the sunset date. For more details, see Deprecating legacy max payable child field.. Maximum number of children eligible for the children rate (the rest are charged as adults), must be less than or equal to number of children. If not specified, defaults to max_children.

Create a Villa with 2 bedrooms and a living room with sofa

curl -i -X POST \
  'https://developers.booking.com/_mock/connectivity/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/properties/{property-id}/units' \
  -H 'Content-Type: application/json' \
  -d '{
    "configuration": {
      "unit_type_id": 31,
      "rooms": [
        {
          "type": "BEDROOM_SUBROOM",
          "bed_configurations": [
            {
              "beds": [
                {
                  "bed_type_id": 6,
                  "bed_count": 1
                },
                {
                  "bed_type_id": 1,
                  "bed_count": 1
                }
              ],
              "is_default_configuration": true
            }
          ]
        },
        {
          "type": "BEDROOM_SUBROOM",
          "bed_configurations": [
            {
              "beds": [
                {
                  "bed_type_id": 1,
                  "bed_count": 3
                }
              ],
              "is_default_configuration": true
            }
          ]
        },
        {
          "type": "LIVING_ROOM_SUBROOM",
          "bed_configurations": [
            {
              "beds": [
                {
                  "bed_type_id": 5,
                  "bed_count": 1
                }
              ],
              "is_default_configuration": true
            }
          ]
        },
        {
          "type": "LIVING_ROOM_SUBROOM"
        }
      ]
    },
    "unit_name_id": 4180,
    "number_of_units": 5,
    "smoking_policy": "SMOKING_AND_NONSMOKING",
    "size": {
      "value": 155,
      "unit": "SQM"
    },
    "partner_reference_name": "Example two-bedroom villa",
    "floor_numbers_located_on": [
      2
    ],
    "occupancy_details": {
      "max_guests": 5,
      "max_adults": 5,
      "max_children": 4,
      "max_infants": 4,
      "max_infants_on_top": 0
    },
    "max_children_that_pay_children_rate": 2,
    "extra_beds_configuration": {
      "extra_beds": 1,
      "cribs": 0,
      "is_crib_and_extra_bed_allowed": false
    }
  }'

Responses

OK

Bodyapplication/json
dataobject(Unit)

Unit schema; use meta endpoint for fetching relevant meta data

warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)
Response
{ "data": { "unit_id": 0, "configuration": { … }, "unit_name_id": 0, "number_of_units": 0, "smoking_policy": "SMOKING", "size": { … }, "partner_reference_name": "string", "floor_numbers_located_on": [ … ], "occupancy": { … }, "occupancy_details": { … }, "extra_beds_configuration": { … }, "max_children_that_pay_children_rate": 0, "unit_name_fallback": "string" }, "warnings": [ { … } ], "errors": [ { … } ], "meta": { "ruid": "string" } }