Last updated

Set house rules for a property

Specify the house rules for a property with the method below. You can only specify house rules for Booking Home property types.

Method and URL

POST https://supply-xml.booking.com/house-rules/properties/{property_id}

Request parameters

ParameterDescriptionTypeRequiredNotes
property_idThe property for which you want to specify house rules.integerRequiredMust be one of the Booking Home types.

Request headers

HeaderDescriptionTypeRequiredNotes
AuthorizationYour Base-64 encoded username and password.stringRequired-

Request body

FieldDescriptionTypeRequiredNotes
smoking_allowedSpecifies whether smoking in the property is allowed (1) or not (0).intOptionalAccepts: 0 (no), 1 (yes)
parties_allowedSpecifies whether guests may have parties at the property (1) or not (0).intOptionalAccepts: 0 (no), 1 (yes)
pets_allowedSpecifies whether pets are allowed.stringOptionalAccepts: yes, no, on_request
pets_price_typeSpecifies whether charges apply for bringing pets (if allowed).stringRequired if pets_allowed is yes or on_requestAccepts: free, charges_may_apply
quiet_hours_setSpecifies whether the property has quiet hours (1) or not (0).intOptionalAccepts: 0 (no), 1 (yes)
quiet_hours_start_timeQuiet hours start time.stringOptionalFormat: HH:00, where HH is 123.
quiet_hours_end_timeQuiet hours end time.stringOptionalFormat: HH:00, where HH is 123.

Sample request

POST /house-rules/properties/1234567
Host: supply-xml.booking.com
Authorization: Basic TWF0dGV...
Content-Type: application/json

{
	"parties_allowed": 0,
	"pets_allowed": "yes",
	"pets_price_type": "free",
	"smoking_allowed": 1,
	"quiet_hours_set": 1,
	"quiet_hours_start_time": "22:00",
	"quiet_hours_end_time": "8:00"
}

Sample response — Success

{
    "errors": [],
    "data": {
        "success": 1
    },
    "meta": {
        "ruid": "UmFuZG9tetc"
    },
    "warnings": []
}

Sample response — Incorrect property type

{
    "errors": [
        {
            "message": "This property is not eligible for house rules.",
            "code": "OPERATION_NOT_ALLOWED",
            "details": null
        }
    ],
    "data": {},
    "warnings": [],
    "meta": {
        "ruid": "UmFuZG9etc"
    }
}

Sample response — Invalid arguments

{
    "errors": [
        {
            "message": "Validation of quiet_hours_start_time failed.",
            "details": {
                "fields": "quiet_hours_start_time"
            },
            "code": "INVALID_ARGUMENT"
        }
    ],
    "meta": {
        "ruid": "UmFuZG9etc"
    },
    "data": {},
    "warnings": []
}

Response headers

HeaderDescriptionTypeNotes
RUIDResponse Unique IDentifier.string-

Response body

FieldDescriptionTypeNotes
successReturned upon a successful request.int-

Response codes

CodeDescriptionNotes
400Bad request.-
404Resource not found.-