Rooms API (1.1)

Contains Rooms API specification

Languages
Servers
https://supply-xml.booking.com/

rooms-api

Create, update, retrieve and delete property units

Operations

Get units

Request

Get all active units for a property

Path
propertyIdinteger(int32)required
Query
debug_infostring

Enable debug to return $.unit_name_fallback field in response

Default "false"
curl -i -X GET \
  'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false'

Responses

OK

Body*/*
dataArray of objects(Unit)
warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)

Create unit

Request

Create new unit for a property

Path
propertyIdinteger(int32)required
Bodyapplication/jsonrequired
configurationobject(Configuration)required
configuration.​unit_type_idinteger(int32)required
  • Must exist and be active in meta (see $.unit_type[*].id and $.unit_type[*].is_active) for unit creation/update
  • Must be valid for property's category in meta (see $.unit_type[*].valid_property_categories)
configuration.​roomsArray of objects(Room)required
configuration.​rooms[].​typestringrequired
  • For multi-room units you must add one or more BEDROOM_SUBROOM and optionally one or more LIVING_ROOM_SUBROOM
  • For single-room units you must add exactly one GUEST_ROOM
Enum"BEDROOM_SUBROOM""LIVING_ROOM_SUBROOM""GUEST_ROOM"
configuration.​rooms[].​bed_configurationsArray of objects(BedConfiguration)
unit_name_idinteger(int32)required
  • Must exist in meta and be active 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(int32)

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

max_children_that_pay_children_rateinteger(int32)[ 0 .. 49 ]

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.

occupancyobject(OccupancyCreate)Deprecated
curl -i -X POST \
  'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/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

Body*/*
dataobject(Unit)

Unit schema; use meta endpoint for fetching relevant meta data

warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)

Delete unit

Request

Delete existing unit for a property

Path
propertyIdinteger(int32)required
unitIdinteger(int64)required
curl -i -X DELETE \
  'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units/{unitId}'

Responses

OK

Body*/*
dataobject
warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)

Update unit

Request

Update existing unit for a property

Path
propertyIdinteger(int32)required
unitIdinteger(int64)required
Bodyapplication/jsonrequired
unit_idinteger(int64)
configurationobject(Configuration)
unit_name_idinteger(int32)
  • Must exist in meta and be active in meta (see $.unit_names)
number_of_unitsinteger(int32)

Number of units must be between 0 and 32000

smoking_policystring

Room smoking policy

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(int32)

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

occupancy_detailsobject(OccupancyDetails)
extra_beds_configurationobject(ExtraBedsConfiguration)

Extra bed & crib options

max_children_that_pay_children_rateinteger(int32)[ 0 .. 49 ]

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.

unit_name_fallbackstring

Contains unit name (EN_GB locale) for any unit name ID, including those missing in meta (for debug purposes only; read only)

occupancyobject(Occupancy)Deprecated
curl -i -X PATCH \
  'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units/{unitId}' \
  -H 'Content-Type: application/json' \
  -d '{
    "configuration": {
      "unit_type_id": 1,
      "rooms": [
        {
          "type": "BEDROOM_SUBROOM",
          "bed_configurations": [
            {
              "beds": [
                {
                  "bed_type_id": 3,
                  "bed_count": 1
                },
                {
                  "bed_type_id": 1,
                  "bed_count": 1
                }
              ],
              "is_default_configuration": true
            }
          ]
        },
        {
          "type": "LIVING_ROOM_SUBROOM",
          "bed_configurations": [
            {
              "beds": [
                {
                  "bed_type_id": 5,
                  "bed_count": 1
                }
              ],
              "is_default_configuration": true
            }
          ]
        }
      ]
    }
  }'

Responses

OK

Body*/*
dataobject
warningsArray of objects(ApiError)
errorsArray of objects(ApiError)
metaobject(ResponseMeta)

meta

Retrieve units meta data and translations

Operations