Send licence information
If your property is located in a country or region that requires a licence to operate, you must submit this information to Booking.com using the Licences API. For properties that require a license to operate, this step is mandatory to go open and bookable.
This step contains two sub-tasks. You will:
- Check for the licence requirements for your property
- Based on the requirements, either:
- Send licence information for the property
- Send licence information for specific units within the property
Prerequisites
You must have the following:
- A property ID by completing step 2 successfully.
- A unit ID by completing step 3 successfully.
Check licence requirements
In this tutorial, the Home-type property requires a property licence.
GET
https://supply-xml.booking.com/licenses/rules/properties/{propertyID}
Path parameters
The following table describes the elements you must specify in the path:
Element | Description | Type | Required/ Optional | Notes |
---|---|---|---|---|
propertyID | Specifies the unique ID of the property. | integer | required |
Sample request
The following is a sample GET request:
GET https://supply-xml.booking.com/licenses/rules/properties/14795361
Response body example
The following is a successful response body example:
Based on the response, the test property requires a licence number and the licence holder's name at the room level.
{
"data": {
"variants": [
{
"name": "japan_new_minpaku_shinpo_license_v1",
"id": 304,
"content": [
{
"format": "^(?!M123456789$)M[0-9]{9}$",
"name": "number",
"required": true,
"dataType": "string"
},
{
"name": "Japan_license_holder_name",
"required": true,
"dataType": "string"
},
{
"name": "issue_date",
"required": false,
"dataType": "date"
},
{
"name": "certificate_copy",
"required": false,
"dataType": "file"
}
]
},
{
"name": "japan_new_minpaku_tokku_license_v1",
"id": 305,
"content": [
{
"name": "number",
"required": true,
"dataType": "string"
},
{
"name": "Japan_license_holder_name",
"required": true,
"dataType": "string"
},
{
"name": "issue_date",
"required": false,
"dataType": "date"
},
{
"name": "certificate_copy",
"required": false,
"dataType": "file"
}
]
},
{
"name": "japan_new_ryokan_license_v1",
"id": 306,
"content": [
{
"name": "number",
"required": true,
"dataType": "string"
},
{
"name": "Japan_license_holder_name",
"required": true,
"dataType": "string"
},
{
"name": "issue_date",
"required": false,
"dataType": "date"
},
{
"name": "certificate_copy",
"required": false,
"dataType": "file"
}
]
}
],
"name": "japan_new",
"id": 201,
"active": true,
"level": "room"
},
"warnings": [],
"errors": [],
"meta": {
"ruid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
Send licence information for the room
In this step, we will send the licence information of the room.
PUT https://supply-xml.booking.com/licenses/data/properties/{property_id}/rooms/{room_id}
Path parameters
The following table describes the elements you must specify in the path:
Element | Description | Type | Required/ Optional | Notes |
---|---|---|---|---|
propertyID | Specifies the unique ID of the property. | integer | required |
Request body parameters
All parameters are required.
Element | Description |
---|---|
> data | Contains the request body elements. |
>> contentData | Contains licence requirements as name-value pairs. |
>>> name | Specifies the name of the licence requirement element. You can have multiple licence elements (with corresponding values). This varies depending on the property region. |
>>> value | Specifies the value corresponding to the name of the licence requirement element. You must follow the data type and format specified by dataType and format respectively. |
>> variantId | Specifies the ID of the licence variant, applicable to the specified property. See response from the GET call. |
Request body example
The following is a request body example:
{
"data": {
"variantId": 304,
"contentData": [
{
"name": "number",
"value": "M987654321"
},
{
"name": "Japan_license_holder_name",
"value": "Satoshi-san"
}
]
}
}
Response body example
The following is a successful response body example:
{
"data": {
"success": 1
},
"warnings": [],
"errors": [],
"meta": {
"ruid": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}