openapi: 3.0.1
info:
title: Rooms API
description: Contains Rooms API description
contact:
name: Connectivity Team
url: https://connect.booking.com
email: connectivity@booking.com
version: '1.0'
servers:
- url: https://supply-xml.booking.com/
tags:
- name: meta
description: Retrieve listings meta data and translations
- name: rooms-api
description: Create, update, retrieve and delete property listings
paths:
/rooms-api/properties/{propertyId}/listings:
get:
tags:
- rooms-api
summary: Get listing
description: Get all active listings for a property
operationId: getListingsByPropertyId
parameters:
- name: propertyId
in: path
required: true
schema:
type: integer
format: int32
- name: debug_info
in: query
description: >-
Enable debug to return $.listing_name_fallback
field in
response
required: false
schema:
type: string
default: 'false'
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseListListing'
post:
tags:
- rooms-api
summary: Create listing
description: Create new listing for a property
operationId: createListing
parameters:
- name: propertyId
in: path
required: true
schema:
type: integer
format: int32
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListingCreate'
examples:
Create a Villa with 2 bedrooms and a living room with sofa:
description: Create a Villa with 2 bedrooms and a living room with sofa
value:
configuration:
listing_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
listing_name_id: 4180
number_of_listings: 5
smoking_policy: SMOKING_AND_NONSMOKING
size:
value: 155
unit: SQM
partner_reference_name: Example two-bedroom villa
floor_numbers_located_on:
- 2
occupancy:
max_guests: 5
max_adults: 5
max_children: 4
max_children_that_pay_children_rate: 2
extra_beds_configuration:
extra_beds: 1
cribs: 0
is_crib_and_extra_bed_allowed: false
Create a one-bedroom Apartment with a living room:
description: Create a one-bedroom Apartment with a living room
value:
configuration:
listing_type_id: 1
rooms:
- type: BEDROOM_SUBROOM
bed_configurations:
- beds:
- bed_type_id: 3
bed_count: 1
is_default_configuration: true
- type: LIVING_ROOM_SUBROOM
listing_name_id: 865
number_of_listings: 5
smoking_policy: SMOKING
size:
value: 155
unit: SQM
partner_reference_name: Example single-bedroom apartment
floor_numbers_located_on:
- 2
occupancy:
max_guests: 3
max_adults: 3
max_children: 1
max_children_that_pay_children_rate: 1
extra_beds_configuration:
extra_beds: 1
cribs: 1
is_crib_and_extra_bed_allowed: true
Create a one-bedroom Suite with minimum required fields:
description: Create a one-bedroom Suite with minimum required fields
value:
configuration:
listing_type_id: 5
rooms:
- type: BEDROOM_SUBROOM
bed_configurations:
- beds:
- bed_type_id: 3
bed_count: 1
is_default_configuration: true
listing_name_id: 746
Create a Double with multiple bed configurations:
description: Create a Double with multiple bed configurations
value:
configuration:
listing_type_id: 9
rooms:
- type: GUEST_ROOM
bed_configurations:
- beds:
- bed_type_id: 3
bed_count: 1
is_default_configuration: true
- beds:
- bed_type_id: 1
bed_count: 2
is_default_configuration: false
listing_name_id: 255
number_of_listings: 20
smoking_policy: NONSMOKING
size:
value: 24
unit: SQM
partner_reference_name: Example double with multiple bed configurations
floor_numbers_located_on:
- 1
- 2
- 3
- 4
- 5
occupancy:
max_guests: 2
max_adults: 2
max_children: 1
max_children_that_pay_children_rate: 1
extra_beds_configuration:
extra_beds: 0
cribs: 1
is_crib_and_extra_bed_allowed: false
Create a Studio with a single bed configuration:
description: Create a Studio with a single bed configuration
value:
configuration:
listing_type_id: 12
rooms:
- type: GUEST_ROOM
bed_configurations:
- beds:
- bed_type_id: 3
bed_count: 1
is_default_configuration: true
listing_name_id: 1147
number_of_listings: 20
smoking_policy: NONSMOKING
size:
value: 24
unit: SQM
partner_reference_name: Example studio with a single bed configuration
occupancy:
max_guests: 2
max_adults: 2
max_children: 1
max_children_that_pay_children_rate: 1
extra_beds_configuration:
extra_beds: 0
cribs: 1
is_crib_and_extra_bed_allowed: false
Create a Single with minimum required fields:
description: Create a Single with minimum required fields
value:
configuration:
listing_type_id: 10
rooms:
- type: GUEST_ROOM
bed_configurations:
- beds:
- bed_type_id: 1
bed_count: 1
is_default_configuration: true
listing_name_id: 69
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseListing'
/rooms-api/properties/{propertyId}/listings/{listingId}:
delete:
tags:
- rooms-api
summary: Delete listing
description: Delete existing listing for a property
operationId: deleteListing
parameters:
- name: propertyId
in: path
required: true
schema:
type: integer
format: int32
- name: listingId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseObject'
patch:
tags:
- rooms-api
summary: Update listing
description: Update existing listing for a property
operationId: updateListing
parameters:
- name: propertyId
in: path
required: true
schema:
type: integer
format: int32
- name: listingId
in: path
required: true
schema:
type: integer
format: int64
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Listing'
examples:
Add additional single bed to bedroom for multi-room listing:
description: Add additional single bed to bedroom for multi-room listing
value: |
{
"configuration": {
"listing_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
}
]
},
]
}
}
Remove beds from a living room for multi-room listing:
description: Remove beds from a living room for multi-room listing
value:
configuration:
listing_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
Add additional bed configuration for mono-room listing:
description: Add additional bed configuration for mono-room listing
value:
configuration:
listing_type_id: 9
rooms:
- type: GUEST_ROOM
bed_configurations:
- beds:
- bed_type_id: 3
bed_count: 1
is_default_configuration: true
- beds:
- bed_type_id: 1
bed_count: 2
is_default_configuration: false
Update size, occupancy and extra beds configuration for any listing type:
description: >-
Update size, occupancy and extra beds configuration for any
listing type
value:
size:
value: 99
unit: SQM
occupancy:
max_guests: 5
max_adults: 5
max_children: 2
max_children_that_pay_children_rate: 2
extra_beds_configuration:
extra_beds: 2
cribs: 1
is_crib_and_extra_bed_allowed: true
Update listing name, number of listings, smoking policy and partner reference name for any listing type:
description: >-
Update listing name, number of listings, smoking policy and
partner reference name for any listing type
value:
listing_name_id: 2273
number_of_listings: 3
smoking_policy: SMOKING
partner_reference_name: Example reference name
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ApiResponseObject'
/rooms-api/meta:
get:
tags:
- meta
summary: Get meta data for listings
description: >
Retrieve meta data required for listing creation and update for any
supported language_code
$.listing_types[*]
record you will find:listing_type_id
: the listing type ID you must provide with each create and update requestlisting_type_name
: string representation of listing type ID (translatable)is_multi_room
: attribute that defines what type of room types you can use add in your listingis_active
: attribute that defines if a listing type is available for creation/update, inactive room types are available for read onlyvalid_property_categories
: list of property categories that allow creation of this listing typesuggested_listing_names
: list of listing names that we recommend to use in combination with this listing type$.listing_names[*]
record you will find:listing_name_id
: the listing name ID you must provide with each create requestlisting_name
: string representation of listing name ID (translatable)$.bed_types[*]
record you will find:bed_type_id
: the bed type ID you must provide when configuring roomsbed_type_name
: string representation of bed type (translatable)bed_type_description
: description of bed type size using metric units (translatable)bed_type_description_imperial
: description of bed type size using imperial units (translatable)is_active
: attribute that defines if a bed type is available for creation/update, inactive bed types are available for read only$.bed_types[*].is_active
)$.listing_type[*].id
and
$.listing_type[*].is_active
) for listing
creation/update$.listing_type[*].valid_property_categories
)true
) or
only one of the options (false
)?
default: false
description: Extra bed & crib options
ListingCreate:
required:
- configuration
- listing_name_id
type: object
properties:
configuration:
$ref: '#/components/schemas/Configuration'
listing_name_id:
type: integer
description: >
$.listing_names
)BEDROOM_SUBROOM
and optionally one or more
LIVING_ROOM_SUBROOM
GUEST_ROOM
true
) or
only one of the options (false
)?
description: Extra bed & crib options
Listing:
type: object
properties:
listing_id:
type: integer
format: int64
configuration:
$ref: '#/components/schemas/Configuration'
listing_name_id:
type: integer
description: >
$.listing_names
)