RTDF (Real-Time Data Feed)
Setting up a Real-Time Data Feed import
This page contains information specific to the RTDF format. For a general guide on setting up a property import, please see our 'Creating your first property import' guide.
The original RTDF specification uses certificates as an authentication method. We don't use certificates so these can be left blank.
When using this format to feed properties to Rightmove or other portals there is the notion of a 'network ID'. We don't use this so this can be left blank or filled with a rogue value.
When creating an import in the Real-Time Data Feed (RTDF) format, you'll be presented with the following:
There are no additional options available until you create the feed.
Once the feed is created and you go to edit the import you'll then get the endpoints presented to you:
This is because the endpoint contains the import ID which we don't know until the import has been created.
It's these endpoints you'll send to the third party wanting to send properties to Property Hive.
If they require different endpoints you can amend them here.
The endpoints/options available are:
Send property endpoint URL: The URL that the third party can use to send a property.
Remove property endpoint URL: The URL that the third party can use to remove a property.
Branch properties endpoint URL: The URL that the third party can use to get all properties for a particular branch.
Branch emails endpoint URL: The URL that the third party can use to get enquiries made on properties belonging to a particular branch.
Response format: Whether the response should be sent as XML, JSON, or the same as whatever format the request was made in.
Developer hooks
Hook name: propertyhive_property_import_rtdf_mandatory_fields_send
Hook type: Filter
Description: Allows you to customise which fields are classed as 'mandatory' in send requests.
Example usage:
add_action( 'propertyhive_property_import_rtdf_mandatory_fields_send', 'custom_mandatory_fields' ); function custom_mandatory_fields( $mandatory_fields ) { // $mandatory_fields (array) - array of mandatory fields // Default: /*array( 'network' => array( 'network_id' => 'network_id', ), 'branch' => array( 'branch_id' => 'branch_id', 'channel' => 'channel', ), 'property' => array( 'agent_ref' => 'agent_ref', 'published' => 'published', 'property_type' => 'property_type', 'status' => 'status', 'address' => array( 'house_name_number' => 'house_name_number', 'postcode_1' => 'postcode_1', 'postcode_2' => 'postcode_2', 'display_address' => 'display_address', ), 'price_information' => array( 'price' => 'price', ), 'details' => array( 'summary' => 'summary', 'description' => 'description', ), ), )*/ // Make address name/number not mandatory unset($mandatory_fields['property']['address']['house_name_number']); return $mandatory_fields; }
Hook name: propertyhive_property_import_rtdf_mandatory_fields_remove
Hook type: Filter
Description: Allows you to customise which fields are classed as 'mandatory' in remove requests.
Example usage:
add_action( 'propertyhive_property_import_rtdf_mandatory_fields_remove', 'custom_mandatory_fields' ); function custom_mandatory_fields( $mandatory_fields ) { // $mandatory_fields (array) - array of mandatory fields // Default: /* array( 'network' => array( 'network_id' => 'network_id', ), 'branch' => array( 'branch_id' => 'branch_id', 'channel' => 'channel', ), 'property' => array( 'agent_ref' => 'agent_ref', ), )*/ // Make network_id not mandatory unset($mandatory_fields['network']['network_id']); return $mandatory_fields; }
Hook name: propertyhive_property_import_rtdf_mandatory_fields_get_properties
Hook type: Filter
Description: Allows you to customise which fields are classed as 'mandatory' in get branch properties requests.
Example usage:
add_action( 'propertyhive_property_import_rtdf_mandatory_fields_get_properties', 'custom_mandatory_fields' ); function custom_mandatory_fields( $mandatory_fields ) { // $mandatory_fields (array) - array of mandatory fields // Default: /* array( 'network' => array( 'network_id' => 'network_id', ), 'branch' => array( 'branch_id' => 'branch_id', ), )*/ // Make network_id not mandatory unset($mandatory_fields['network']['network_id']); return $mandatory_fields; }
Hook name: propertyhive_pre_import_property_rtdf
Hook type: Action
Description: Executed after a property is validated and parsed but before it's are actually imported.
Example usage:
add_filter( 'propertyhive_pre_import_property_rtdf', 'pre_property_import' ); function pre_property_import( $property ) { // $property (array) - Array containing property data parsed in feed // do something here... }
Hook name: propertyhive_rtdf_property_due_import
Hook type: Filter
Description: Executed after a property is validated and parsed but before actually being imported. Allows you to customise the property data pre import.
Example usage:
add_filter( 'propertyhive_rtdf_property_due_import', 'customise_property' ); function customise_property( $property ) { // $property (array) - Array containing property data parsed in feed // append some text to the description $property['details']['description'] .= 'Appended content here'; return $property; }
Hook name: propertyhive_rtdf_address_fields_to_check
Hook type: Filter
Description: If you have locations setup under 'Property Hive > Settings > Custom Fields' we'll look at a number of address fields provided in the property data and, if a matching 'Location' is found, we'll set it accordingly.
Using this filter you can customise the address fields in the property data that we consider when looking for a matching location.
Example usage:
add_filter( 'propertyhive_rtdf_address_fields_to_check', 'customise_address_fields' ); function customise_address_fields($address_fields) { // $address_fields (array) - defaults to ['address_2', 'address_3', 'address_4', 'town'] $address_fields[] = 'house_name_number'; // also look at house name/number field return $address_fields; }
Hook name: propertyhive_property_imported_rtdf
Hook type: Action
Description: Executed after a property is imported.
Example usage:
add_action( 'propertyhive_property_imported_rtdf', 'property_imported', 10, 2 ); function property_imported( $post_id, $property ) { // $post_id (int) - the WordPress post ID of the imported property // $property (array) - The property data received in the feed // do something here... }
Hook name: propertyhive_property_removed_rtdf
Hook type: Action
Description: Executed after a property has been removed from Property Hive as a result of a remove request.
Example usage:
add_action( 'propertyhive_property_removed_rtdf', 'property_removed' ); function property_removed( $post_id ) { // $post_id (int) - the WordPress post ID of the imported property // do something here... }