Last updated

Self-certification tutorial: Property settings

In this tutorial, you will use the Property API to:

  • Read the settings of an existing property
  • Add a new setting. For example, child policy
  • Update the setting
  • Contact Connectivity Support to validate your integration and enable live/production property access

Who is this for?

You should follow this if you are a developer who has completed the integration of Property API’s settings endpoints and is looking to start using this with live properties in production.

Before you start

You will need the following to complete the tutorial:

  • A test property with the appropriate machine account permissions

Step 1 - Read the existing settings state

With your new Property Settings API integration, trigger your system to read the settings of the property using the endpoint listed below. Save the RUID to include in your report to Connectivity Support (see below).

Sample request:

GET
https://supply-xml.booking.com/property-api/properties/{propertyID}/settings
Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Accept-VersionSpecify the version number to get the API functionality specific to that version.stringoptionalCurrently supports the value: 1.0
Response body

The following is a response body example:

{
	"data": {
		"property_settings": {
			"require_cvc": false,
			"require_booker_address": false,
			"require_booker_contact_number": false,
			"auto_replenish": true,
			"replenish_closed_rooms": true,
			"pricing_type": "Standard",
			"allow_smoking": true,
			"view_cc_details": false
		},
		"pets": {
			"pets_allowed": "PETS_NOT_ALLOWED"
		},
		"damage_policy": {
			"amount": 0.0,
			"policy_type": "NONE",
			"damage_programme_terms_agreed": false
		},
		"standard_phrases": [],
		"invoice_settings": {
			"legal_name": "Value",
			"contact_person": "Value",
			"address": "Value",
			"state": "Value",
			"notification_channel": "EMAIL",
			"country_code": "Value",
			"city": "Value",
			"postal_code": "Value"
		},
		"booking_model": {
			"type": "IB"
		}
	},
	"warnings": [],
	"errors": [],
	"meta": {
		"ruid": "someRuid"
	}
}

Step 2 - Add a new setting

Using your system, trigger the creation of a new setting such as adding a child policy like below. Save the RUID to include in your report to connectivity support.

Sample request:

POST
https://supply-xml.booking.com/property-api/properties/{propertyID}/settings
Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Content-Type: application/jsonSpecifies the expected content type.stringrequired
Accept-VersionSpecify the version number to get the API functionality specific to that version.stringoptionalCurrently supports the value: 1.0
Request body

The following is a request body example:

{
	"children_policies": {
		"allow_children": true,
		"min_age": 12
	}
}
Response body

The following is a response body example:

{
	"data": {
		"child_policies": {
			"success": true
		}
	},
	"warnings": [],
	"errors": [],
	"meta": {
		"ruid": "someRuid"
	}
}

Step 3 - Update the setting

Using your system, trigger an update request to an existing setting using the endpoint listed below. Save the RUID to include in your report to connectivity support.

Sample Request:
POST
https://supply-xml.booking.com/property-api/properties/{propertyID}/settings
Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Content-Type: application/jsonSpecifies the expected content type.stringrequired
Accept-VersionSpecify the version number to get the API functionality specific to that version.stringoptionalCurrently supports the value: 1.0
Request body:

The following is a request body example:

{
	"children_policies": {
		"allow_children": false
	}
}
Response body
{
	"data": {
		"child_policies": {
			"success": true
		}
	},
	"warnings": [],
	"errors": [],
	"meta": {
		"ruid": "someRuid"
	}
}

Step 4 - Send the RUIDs to Booking.com

Through your organization’s domain email address, send the RUID values obtained in the response bodies of the POST, GET, and the PATCH requests to connectivity@booking.com for validation and certification.

Email template

I would like to be certified for production use of Property Settings endpoints. Please find the RUIDs for all the steps in the tutorial.

I look forward to hearing from you.