API Information
We have set up an API system for estate and letting agents to make the process of registering your reference numbers quick and easy. An API system givs your software/website controlled access to our databases to make data exchange quick and hassle-free.
We also have an email registration system and a manual registration system it is up to you which one(s) you decide to use.
In order to use this system please create your script and then contact us so that we may test and approve your script before going live on the system.Sending us your Serial Numbers
In order to send property serial number information to us via email you first need to obtain your 'Secret Code' from your user profile on the website (found near the bottom of the page).
We have developed a strong error resistant API registration system which is easy to adopt for your agencies systems.
There is an example of an API send using cURL (& PHP) if you require examples in other programming languages then please get in touch and we will do our best to provide examples to your company as soon as possible.
Required Data Fields
Data is sent to us via POST variables a single record at a time. All records are required except for 'flat' and 'property URL'.
For each record you need to provide the following data (validation information included):
- Username - Your username for this website.
- Secret Code - A secret code which can be found in your user profile.
- System reference - Unique reference to property on your systems (min 1 char., max 100 char.)
- Your reference - Human readable reference (min 3 char., max 100 char.)
- Message - The SMS message returned to clients. Note: Does not need to include contact information, property price, or agency name. Please see our SMS writing guide for help (min 30 char., max 106 char.)
- Registration Number - Property registration number, not to include your agency shortcode. Note: If this registration number matches that of a property currently in the system with the same registration number the new record will superceed the previous property entry (min 3 char., max 30 char. alphanumeric only, no spaces)
- Street - Street Address of the property. Note: Including number of the property is optional (min 3 char., max 100 char., alphanumeric, spaces allowed)
- Town - Town/Area/Suburb of the property (min 3 char., max 100 char., alphanumeric, spaces allowed)
- Flat - Flat number of the property. Note: Optional field (min 3 char., max 100 char., alphanumeric, spaces allowed)
- City - Nearest city of the property (min 3 char., max 100 char., alphanumeric, spaces allowed)
- Postcode - Postcode of the property. Note: Including number of the property is optional (min 3 char., max 12 char., alphanumeric, spaces allowed)
- Type - Listing type. Note: If there is an error on this field then listing type defaults to Sales.
- Type = 1: Property for Sale
- Type = 2: Property for Rental
- Price - Property price in GBP (£). Do not include the pound (£) sign, value is to be of integer type.
- Maximum sales price is £9,999,999.
- Maximum rental price is £99,999 per calendar month
- County - The county that the property resides in (min 3 char., max 100 char., alphanumeric, spaces allowed)
- Country - One of the following. Note: If error detected in this field then listing defaults to England.
- England or england
- Wales or wales
- Scotland or scotland
- Status - What you would like to do with the listing. Note: For property listin updates or deletions then the system reference fields must match. Field must be one of the following (on error defaults to 'new'):
- delete
- replace
- new
- Property URL - Related URL for the property. Note: This field is optional however if supplied must include the 'http://' and a correct format website address.
In many cases if the field is over the maximum number of characters then the field is simply cut to the maximum number of characters. If a field is supposed to be alphanumeric or does not reach the minimum number of characters then an error is generated.
Example
Below is an example of how to perform the API send using cURL and PHP. If you have any questions then please feel free to get in touch about the system. Once you have your API script written please contact us to obtain an upload address and to have your script tested/verified.
PHP Code:
//build url from variables
$data = "username=" . urlencode($username);
$data .= "secretCode=" . urlencode($secretCode);
$data .= "external=" . urlencode($systemReference);
$data .= "externalReference=" . urlencode($yourReference);
$data .= "message=" . urlencode($message);
$data .= "shortcode=" . urlencode($registrationNumber);
$data .= "street=" . urlencode($street);
$data .= "town=" . urlencode($town);
$data .= "flat=" . urlencode($flat);
$data .= "city=" . urlencode($city);
$data .= "postcode=" . urlencode($postcode);
$data .= "type=" . urlencode($type);
$data .= "price=" . urlencode($price);
$data .= "county=" . urlencode($county);
$data .= "country=" . urlencode($country);
$data .= "status=" . urlencode($status);
$data .= "propertyURL=" . urlencode($propertyURL);
$address = '< Provided upon request >'
//send messages
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://$address");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
//use this to suppress output
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);
curl_close ($ch);












