Retrieving regional license requirements

Outdated information

The information on this page is outdated. Use it at your own risk.
To retrieve current licence requirements and send your properties' licence information to Booking.com, use the new Licences API.

GET https://supply-xml.booking.com/licenses/check_requirements?country_code={two-letter country code}&lat={latitude}&long={longitude}&property_type_id={property_type_id}

In several countries and regions, the local government requires properties to have a special license. When you create or update properties in these regions, you must provide the property's license details.

The /licenses/check_requirements endpoint enables you to check the license requirements for a specific geographical location.

Path parameters

The following table lists the path parameters in the request:

Parameter Description Type Required Notes
country_code The two-letter country code. string Required -
lat Property's latitude. float Required Check a property's coordinates with /ota/OTA_HotelDescriptiveInfo.
long Property's longitude. float Required Check a property's coordinates with /ota/OTA_HotelDescriptiveInfo.
property_type_id Property Class Type Code. If this parameter is provided - results will be filtered to only contain license requirements applicable to certain property type. int Optional -

Header parameters

The following table lists the header parameters in the request:

Header Description Type Required Notes
Authorization Your Base-64 encoded username and password. string Required -

Sample request

You can find an example request in cURL here:

curl -X GET \ 
https://supply-xml.booking.com/licenses/check_requirements?country_code=fr&lat=48.8566&long=2.3522&property_type_id=232

Sample response

The following is an example of a response:

{
    "data": [
        {
            "can_agree_to_no_license": 0,
            "required": 1,
            "requirement_name": "Paris",
            "format_example": "1234567891012",
            "regex_pattern": "^[0-9]{13}$",
            "explanation_url": "https://www.paris.fr/meubles-touristiques"
        }
    ],
    "meta": {
        "ruid": "UmFuZG9tSVYkc2Rasds9YQ2PyKsBoS2jTzyGn043KePlVDx2v0hDpM+5xXPEj5WKCF5XT6QUCkwZZ581ALn2udpIjJRayCDsa8oqAtCQoz4="
    },
    "warnings": [],
    "errors": []
}

The data object contains any license requirements found for this location. If the data object is empty, there are no known license requirements.

Error messages

The following is an example of an error message:

{
    "errors": [
        {
            "code": "INVALID_ARGUMENT",
            "details": {
                "fields": [
                    "country_code"
                ]
            }
            "message": "123 is not a valid country code."
        }
    ],
    "meta": {
        "ruid": "UmFuZG9tSVYkc2RlIyh9YaI/Zau9l0XDRPmMDmJ+qAVlE1rKfv6ULEEsykfiCWQVGO6/eVsSaFMeCirwc19NrNodlkEz4pA13WTJIrEvmZ4="
    },
    "warnings": [],
    "data": {}
}

Response headers

The following table lists the header parameters in the response:

Header Description Type Notes
RUID Response Unique IDentifier. string -

Response body

The following table lists the elements in the response body:

Field Description Type Notes
data license requirements for the specified location. array of LicenseRequirement objects If empty, there are no license requirements (that Booking.com knows of).
data.
can_agree_to_no_license
Specifies whether the property can be exempt from providing a license number (1) or not (0). flag -
data.
explanation_url
URL for a website that explains the requirement. string -
data.
format_example
An example of what the license number should look like. string -
data.
regex_pattern
Shows the regular expression pattern we use to validate the license number. string If empty, it means there is no fixed pattern, or we don't have the necessary information to provide one.
data.
required
Specifies whether a license number is required (1) or optional (0). flag -
data.
requirement_name
Name of the requirement. string -
meta Metadata that identifies the request. object Use this information when talking to Connectivity Support.
warnings Details about any warnings that occurred. array -
errors Details about any errors that occurred. array -
errors.
code
Error code. string -
errors.
details
Additional details to specify the error. object -
errors.details.
fields
The request fields that caused the error. array -
errors.
message
Human-readable error text. string -

Response codes

You can receive the following reponse codes:

Code Description Notes
200 OK. -
400 Bad request. One of the provided parameters was incorrect. Additional info in errors object.
500 Server-side error. -