Template Based Integration


Dezrez provides a live search of an agent's properties for their website. The search consists of a standard HTML form containing search criteria which is submitted to the dezrez servers using a standard HTTP POST. A HTML page of search results which match the criteria is then produced by our servers and returned to the client. Clicking on each property will submit another query to our servers which will return a second HTML page containing the full details of the property.

The formatting of the HTML for the search results and full details pages are based on a template stored on our servers. There are several standard templates which you can choose from or we can customise a template to match your design on request. You can also customise a style sheet (.css) file which we can attach to the page to maintain control of the font styles/color etc.


Search Form Example

Here is an example of a simple dezrez search form:

copy
<h1>Search for a property</h1>
    <form action="http://www.dezrez.com/DRApp/DotNetSites/WebEngine/property/Default.aspx" method="post" name="searchForm">
    <input type="hidden" name="eaid" value="398" />
    <input type="hidden" name="apikey" value="DEBF038A-8047-42F8-B0A8-12C35DA33F13" />
        <div class="searchholder">
            <div class="searchheading">Minimum price:</div>
            <div>
                <select name="minPrice" id="minPrice">
                    <option value="0">Minimum price</option>
                    <option value="50000">£50,000</option>
                    <option value="100000">£100,000</option>
                    <option value="150000">£150,000</option>
                    <option value="200000">£200,000</option>
                    <option value="250000">£250,000</option>
                    <option value="300000">£300,000</option>
                    <option value="350000">£350,000</option>
                    <option value="400000">£400,000</option>
                    <option value="500000">£500,000</option>
                    <option value="750000">£750,000</option>
                    <option value="1000000">£1,000,000</option>
                    <option value="99999999">+£1,000,000</option>
                </select>
            </div>
            </div>
            <div class="searchholder">
                <div class="searchheading">Maximum price:</div>
                <div>
                    <select name="maxPrice" id="maxPrice">
                        <option value="99999999">Maximum price</option>
                        <option value="50000">£50,000</option>
                        <option value="100000">£100,000</option>
                        <option value="150000">£150,000</option>
                        <option value="200000">£200,000</option>
                        <option value="250000">£250,000</option>
                        <option value="300000">£300,000</option>
                        <option value="350000">£350,000</option>
                        <option value="400000">£400,000</option>
                        <option value="500000">£500,000</option>
                        <option value="750000">£750,000</option>
                        <option value="1000000">£1,000,000</option>
                    </select>
                </div>
                </div>
            <div class="searchholder">
                <div class="searchheading">Bedrooms:</div>
                <div>
                    <select name="bedrooms" id="bedrooms">
                        <option value="0">Not Specified</option>
                        <option value="1">1 Bedroom</option>
                        <option value="2">2 Bedrooms</option>
                        <option value="3">3 Bedrooms</option>
                        <option value="4">4 Bedrooms</option>
                        <option value="5">5+ Bedrooms</option>
                    </select>
                </div>
            </div>
        <div class="searchholder">
            <a class="searchButton" href="javascript:document.searchForm.submit();"><span>Search</span></a>
        </div>
    </form>

This will make the form look like:


Search for a property

Minimum price:

Maximum price:

Bedrooms:


Search form reference

The search criteria must be submitted to the dezrez servers using a HTTP POST or GET. The best and most common way to do this is to use a HTML form. The HTTP request should be submitted to the following URL:

http://www.dezrez.com/DRApp/DotNetSites/WebEngine/property/Default.aspx


Search Parameters

Below is a list of parameters which can be submitted to the dezrez servers to produce a list of search results: The following parameters are required:

Parameter name Data type Value Description
apiKey string Example:
DEBF038A-8047-42F8-B0A8-12C35DA33F13
The API (Application Programing Interface) key is an identifier unique for the estate agent and needs to be provided with any request made to the dezrez web engine. After the initial request the web engine will attempt to store the API key for any subsequent request for that session. A key can be obtained from the dezrez web team (0845 465 2222). This is a compulsory value.
eaid int 0-32000 The Estate Agency ID – This number can be obtained from the dezrez web team (0845 465 2222). This is a compulsory value.
sessionGUID string Example:
66ff1de8-0115-48d6-8417-74c238fc8704
The session GUID (Globally Unique Identifier) is used to identify the website users current session. This should be passed from your website to the dezrez web engine to maintain a constant session across the web engine. Not supplying the same sessionGUID with every request for a particular session will result in the website user having to log into the web engine multiple times. See Appendix A for sample code to generate a unique id. This is a compulsory value.

The following parameters are optional:


Parameter name Data type Value Description
branchList string Comma delimited list of values between 0-32000
e.g. “21,22,23”
The branch ID number – i.e. can be use to return properties from a selected offices.
minPrice int 0-100,000,000 Specifies the minimum value of the properties returned. The minPrice and maxPrice values must form a valid range.
maxPrice int 0-100,000,000 Specifies the minimum value of the properties returned. The minPrice and maxPrice values must form a valid range.
bedrooms int 0 - 32000 Specifies the minimum number of bedrooms to be returned.
showSTC bool true if you want to display STC properties for sale and Let Agreed properties for lettings By default the web engine will not return properties marked as sold subject to contract or let agreed. Adding a hidden form with the value “true” will return them, or you can give the option to the user using a checkbox for example.
searchAllAddress text Any freeform text e.g. “St-Ives” The search will return any properties which include the specified text string in any part of the address fields. Codes may be set up by the agent to identify a particular area and these are also search using this parameter e.g. (STI).
searchAddress1 text Any freeform text. Searches address field 1 for instances of the specified text.
searchAddress2 text Any freeform text. Searches address field 2 for instances of the specified text.
searchTown text Any freeform text. Searches the town field for instances of the specified text.
searchCity text Any freeform text. Searches the city field for instances of the specified text.
searchCounty text Any freeform text. Searches the county field for instances of the specified text.
searchCountry text Any freeform text. Searches the country field for instances of the specified text.
searchPostCode text Any freeform text. Searches the postcode field for instances of the specified text.
searchLocationCodes text Any location code set up by the estate agent e.g. “(SWA)”. Location codes always take the format of a 3 character code in brackets “(XXX)” Searches the location code field for instances of the specifies text.
classification int 0/blank = All Types
1 = Residential
2 = New Build
3 = Commercial
4 = Land
5 = foreign
6 = other
7 = Investment
8 = Mooring
Specifies the type of the properties returned.
propertyType int 0=Flats
1=Houses
2=Business
3=Plot
4=Apartment
5=Town House
6=Bungalow
7=Chalet
8=Cottage
9=Semi Detached
10=Detached
11=Terraced
Specifies the property style returned by the search.
rentalPeriod int 0/blank will return sale properties
2 all results in per day
3 all results in per week
4 all results in PCM
5 all results in per Quarter
6 all results in per Year
Specifies whether the search will return sales or rental properties. Returns sales if omitted.
sortDescending bool false/blank - Cheapest property first
true - Most expensive property first
Specifies the search order to use; either cheapest or most expensive property first.
xslt int 1 – 4 This selects a standard HTML template to use for the search results. The templates are numbered 1 – 4. Omitting or leaving blank selects the default template. The default template can be set by the dezrez web team (0845 465 2222).
perpage int 0-32000 The number of properties returned on each search page. Returns 10 properties per page if omitted.
page int 0-32000 The page of properties to return. Returns page 1 if omitted.

Default Search Result Designs



Default Search Result Designs



Appendix A - Sample GUID generation code


Classic ASP

copy

	Function GetGuid() 
		Set TypeLib = CreateObject("Scriptlet.TypeLib") 
		GetGuid = Left(CStr(TypeLib.Guid), 38)
		GetGuid = replace(GetGuid, "{", "")
		GetGuid = replace(GetGuid, "}", "")
		Set TypeLib = Nothing 
	End Function 
								
								

PHP

copy

	function getGUID()
	{
	$theGuid = uniqid(uniqid(), true);
	return $theGuid;
	}
             
								
								

Javascript

copy

	function createUUID() {
    // http://www.ietf.org/rfc/rfc4122.txt 
    var s = [];
    var hexDigits = '0123456789ABCDEF';
    for (var i = 0; i < 32; i++) {
        s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
    }
    s[12] = '4';  // bits 12-15 of the time_hi_and_version field to 0010 
    s[16] = hexDigits.substr((s[16] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01 
    var uuid = s.join('');
    return uuid;
} 
								
								

C#

copy

	
		string sessionGUID = Guid.NewGuid().ToString();