iPhone & iPad API
This API is currently being used by iPhone, iPad and facebook applications which are reading the Zoo Property database and server information to client’s applications. Basically, this API can be used for ANY application which is required to request and read the Zoo Property database.
Search Property
Searching for a property contains several input :
| Field | Description |
|---|---|
type |
Options for type parameters :
|
minprice |
Integer – Minimal price of the property |
maxprice |
Integer – Maximal price of the property |
bedrooms |
Integer – Number of bedrooms |
bathrooms |
Integer – Number of bathrooms |
carspaces |
Integer – Number of carspaces |
property_type |
Muliple property type with “,” coma as separator ex: type1,type2,type3 |
suburb |
Suburb’s value, e.g. Mosman |
page |
Mandatory fields – Integer |
Output :
<property><id_property>1</id_property><description/><headline/><latitude/><longitude/><price>23423</price><status>sold</status><display_price>0</display_price><display_price_text/><bedrooms>3</bedrooms><bathrooms>3</bathrooms><carspaces/><property_type>Condo</property_type><address>122 23</address><type>ResidentialSale</type><deal_type/><sell_type>Sale</sell_type><photo/><updated_at>2010-09-22 12:00:47</updated_at></property>
List of Opentimes
Viewing a list of opentimes requires a page parameter.
| Field | Description |
|---|---|
page |
Mandatory fields – Integer |
Output :
<property><id_property>15</id_property><description/><headline/><latitude>-33.886846</latitude><longitude>151.247649</longitude><price>125000</price><status>available</status><display_price>1</display_price><display_price_text/><bedrooms/><bathrooms/><carspaces/><property_type>Education/Training</property_type><address>2/16 edward street</address><type>BusinessSale</type><deal_type/><sell_type>Sale</sell_type><photo/><updated_at>2009-05-22 14:05:40</updated_at><opentimes><opentime>12 Mar 09, Thu 07:00 AM - 07:00 AM</opentime><opentime>14 Mar 09, Sat 07:00 AM - 07:00 AM</opentime><opentime>27 May 09, Wed 07:00 AM - 07:00 AM</opentime></opentimes></property>
List of Auctions
Viewing a list of auctions requires a page parameter.
| Field | Description |
|---|---|
page |
Mandatory fields – Integer |
Output :
<property><id_property>3</id_property><description>Vivamus et urna. Curabitur id justo. In egestas tellus a elit. Proin nec justo. Ut sollicitudin, tortor ut lobortis adipiscing, ante lorem faucibus nunc, non fermentum nisi lectus vel nulla. Etiam hendrerit gravida magna. In at ante. Mauris dictum. Donec nisl nulla, scelerisque sit amet, porttitor eu, tempor at, turpis. In sodales nunc quis metus. Vivamus mollis suscipit erat. Nullam vitae nunc. Etiam ac mauris nec dolor sodales imperdiet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</description><headline>Bondi Apartment</headline><latitude>-33.753795110424655</latitude><longitude>151.27121597528458</longitude><price>500000</price><status>draft</status><auction_place>Residence</auction_place><auction_date>2009-06-17 : 16:30:00</auction_date><bedrooms>3</bedrooms><bathrooms>2</bathrooms><carspaces>0</carspaces><property_type>Studio</property_type><address>5/105 Edward Street</address><type>ResidentialSale</type><deal_type/><sell_type>Sale</sell_type><photo/><updated_at>2009-09-11 07:44:48</updated_at></property>
List of Properties
Viewing a list of properties requires a page parameter.
| Field | Description |
|---|---|
page |
Mandatory fields – Integer |
<property><id_property>26</id_property><description>-</description><headline>-</headline><latitude>-33.89996234617693</latitude><longitude>151.26834869384766</longitude><price>451236</price><status>draft</status><display_price>2</display_price><display_price_text/><bedrooms>3</bedrooms><bathrooms>5</bathrooms><carspaces>0</carspaces><property_type>Barn</property_type><address>5 Edward Street</address><type>ResidentialSale</type><deal_type/><sell_type>Sale</sell_type><photo/><updated_at>2009-06-19 07:29:44</updated_at></property>
List of Sold Listings
Viewing a list of sold properties.
| Field | Description |
|---|---|
type |
Mandatory fields – sold : search for property with status sold |
minprice |
Integer – Minimal price of the property |
maxprice |
Integer – Maximal price of the property |
bedrooms |
Integer – Number of bedrooms |
bathrooms |
Integer – Number of bathrooms |
carspaces |
Integer – Number of carspaces |
property_type |
Muliple property type with “,” coma as separator ex: type1,type2,type3 |
suburb |
Suburb’s value, e.g. Mosman |
page |
Mandatory fields – Integer |
Output :
<property><id_property>1</id_property><description/><headline/><latitude/><longitude/><price>23423</price><status>sold</status><display_price>0</display_price><display_price_text/><bedrooms>3</bedrooms><bathrooms>3</bathrooms><carspaces/><property_type>Condo</property_type><address>122 23</address><type>ResidentialSale</type><deal_type/><sell_type>Sale</sell_type><photo/><updated_at>2010-09-22 12:00:47</updated_at></property>
List of Agents
Viewing a list of agents assigned to this office.
| Field | Description |
|---|---|
page |
Mandatory fields – Integer |
Output :
<agent><email>anemailaddress2@email.com</email><fax nil="true"/><mobile>217 524 5678</mobile><phone>617 524 5678</phone><id_agent>40</id_agent><name>Peter Julian Ricci</name><description><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p></description><property_available>0</property_available><property_sold>0</property_sold><count_testimonial>1</count_testimonial><facebook_username/><twitter_username/><linkedin_username/><photo/></agent>
List of Property Types
View a List of property types
Output :
<property_types><name>Acreage/Semi-Rural</name><name>Alpine</name><name>Apartment</name><name>Barn</name><name>Block of Units</name><name>Boathouse</name><name>Bungalow</name><name>Cabin</name><name>Castle</name><name>Cave House</name><name>Chalet</name><name>Chateau</name><name>Condo</name><name>Converted church</name><name>Converted factory</name><name>Converted Warehouse</name><name>Development/knockdown</name><name>Dormer</name></property_types>
List of Suburbs
View a List of suburbs requires several inputs:
| Field | Description |
|---|---|
country_name |
Mandatory fields – String. e.g. Australia |
name |
Suburb’s value, e.g. Mosman |
page |
Mandatory fields – Integer |
Property Details
View Property details
Output :
<property_detail><headline/><description/><display_price>0</display_price><display_price_text/><contacts><contact><id>3</id><email>obama@whitehouse.com</email><name>Obama Clinton</name><phone>123-345-23324</phone><mobile>097865554</mobile><fax>88888</fax><description>i am great, i am great, i am great</description><property_available>0</property_available><property_sold>6</property_sold><count_testimonial>2</count_testimonial><facebook_username/><twitter_username/><linkedin_username/><photo/></contact></contacts><office><email>off1@domain.ss.pp</email><name>Bondi</name><phone>223-009-9820</phone><fax>123-000-9999</fax></office><photos></photos><floorplans></floorplans><opentimes></opentimes><auction_place>sdfd</auction_place><auction_date> : </auction_date><features><feature>Balcony/Patio/Terrace</feature></features></property_detail>
Note :
1. Web Service format :
- http://api.agentaccount.com/services/{OFFICE_ID}/properties?page=1
- http://api.agentaccount.com/services/{OFFICE_ID}/property/{PROPERTY_ID}/detail
2. Accessing Iphone Web Services
The web service is protected by HTTP Basic Authentication, so you will need an access and private keys for each office. These keys are located in the API page for that office in your Developer’s System.
example:
To access the API for Office 176 (RWM):
URL: http://api.agentaccount.com/services/176/properties?page=1
Access Key: a2b61513265756aff26a4cfef222c7a594d4c3d8
Private Key: 647b23911bae9c04d11bd6ef89f77ededb4642f9
Hi Zoo Property Team,
I am a developer working for a client who has signed up with Agentpoint. Our client has uploaded listings under Residential Sale, Residential Lease, Holiday Lease and Commercial Sale/Lease. Under Residential Sale, listings have been uploaded for property_types house, land and rural. Under Residential Lease and Holiday Lease, only house has been used. For Commercial, retail has been used with sale or lease. When I list the property_types, there is nothing for holiday house or for commercial properties.
I need to be able to search for listings using the iPhone & iPad Search Property API detailed above, but I am not getting all the results I need. Using the property_type option, I can search for house, land and rural, which are being used by our client and correspond to the field in the xml data. However, there is no property_type for commercial properties or for holiday homes. I need to search for these too, but they don’t exist. In the case of commercial properties, I tried property_type=retail&type=any, but I only get one property – four have been listed, 3 lease and 1 sale – I only get the sale. If I use type=sale or type=lease, I get the same result, 1 property. For Holiday Lease, I cannot select these without getting Residential Lease as well. The problem is that the API does not allow searching any field in the property xml data.
I would like to be able to search on the field and the field (which is what the type option is searching). I also would like to narrow my search by having the field included in the API options, which would allow me to exclude say ‘withdrawn’.
I also need to have the xml data sorted by price (ascending/descending), which your API does not appear to have as an option either.
The API does not provide an option to select the number of entries per page. This seems to be fixed at 10 per page. If the is 10, then there should be only 1 page, but in this case, the field is being set to 2, which is incorrect because it is empty.
I would appreciate your help with these matters so that I can continue my development for my client.
Dr Tony Blackett
Technical Analyst/Programmer
Talltraffic
Hi,
Yes, we will make the adjustments for iPhone & iPad API that you’ve requested. It will be adjusted within next 24 hours and the ticket updated.
thanks
Dear Tony,
This adjustment was made to the API today.
Let us know if you have any problems.
Regards
Zoo
Hi Team Zoo,
I’m unclear about what adjustment you have made to the API.
Can you let me know what changes have been made.
Tony
Hi,
we made these adjustments below:
1. there is no property_type for commercial properties or for holiday homes.
– for property_types you need to add parameter type (residential commercial business holiday), the default is residential.
eg: /services/:office_id/property_type?type=commercial
2. I also would like to narrow my search by having the field included in the API options, which would allow me to exclude say ‘withdrawn’
– I added new parameter “status” in search api, with values (available = 1, sold = 2, leased = 3, withdrawn = 4, underoffer = 5, draft = 6)
eg: /services/:office_id/search?status=1,2,3
3. I also need to have the xml data sorted by price (ascending/descending), which your API does not appear to have as an option either.
– I added new parameters to sort it, with names sort_by_price_asc, sort_by_price_desc
eg: /services/:office_id/search?sort_by_price_asc=true
4. The API does not provide an option to select the number of entries per page. This seems to be fixed at 10 per page.
– I have added new parameter for this, per_page
eg: /services/:office_id/search?per_page=7
thanks
Hi Team Zoo,
Thanks for the changes you have made to this API. However, I still have some problems.
Firstly, the status filter is not working. I tried &status=1 and was returned an empty xml document. Without the status filter I get 29 houses ‘available’ for sale.
Next, per_page works fine, but when the per_page is set so that the number of entries is an integer multiple of per_page, then the number of pages is always one more than there really are. e.g. if there are 20 entries and per_page is set to 10, then is set to 3 – should be 2.
Although, I can list the property types for commercial, holiday, etc. as pointed out above using property_type?type=xxx, I still cannot filter commercial properties and holiday properties using the search API. Do you have any suggestions?
Regards,
Tony
Hi Tony,
We have modified for status and number of pages. And for add criteria property type in search api, It can do by this parameter search?property_type=retail.
If you still have problem when access that params, can you give us full url and parameters that you have set for it so we can check it further.
thanks
Thanks Team Zoo,
The status filter now works well. Unfortunately, pagination is even more broken. Now the is one less than it should be, so for exampl, with of 1, is set to 0 and is set to 2.
May I suggest:
total_pages = 1+ floor((total_entries – 1)/per_page)
and
if current_page < total_pages then
next_page = current_page + 1
else
next_page = ''
Also, to help me sort the commercial and holiday house issue, can you add another option to the search query so that
search?listing_type=
filters on the field of the XML data, allowing to filter on any combination of ResidentialSale, ResidentialLease, Commercial, HolidayLease, etc. These could be specified like the status filter using 1=ResidentialSale, 2=ResidentialLease, and so on.
Thanks again for all your efforts. The improvements you have made have been enormously helpful.
Tony
Hi Zoo Team,
Just to correct some things in my last post:
The status filter now works well. Unfortunately, pagination is even more broken. Now the total_pages is one less than it should be, so for example, with total_entries of 1, total_pages is set to 0 and next_page is set to 2.
Also, to help me sort the commercial and holiday house issue, can you add another option to the search query so that
search?listing_type=
filters on the <type> field of the XML data, allowing to filter on any combination of ResidentialSale, ResidentialLease, Commercial, HolidayLease, etc. These could be specified like the status filter using 1=ResidentialSale, 2=ResidentialLease, and so on.
Tony
Hi Tony,
Thanks for your suggest, we have fixed it. And added new parameter for search listing type.
You can use by this way to search listing type,
search?listing_type=Commercial
or for multiple values, search?listing_type=ResidentialSale,ResidentialLease,Commercial,HolidayLease
(this will search properties with listing type ResidentialSale or ResidentialLease or Commercial or HolidayLease )
thanks
Thanks so much everyone. I’ll let you know how it’s working for us.
Tony
Hi Team Zoo,
We are almost there. Still having an issue with commercial properties. I am using the following API link for commercial sale:
http://api.agentaccount.com/services/office_id/search?type=sale&property_type=retail&list_type=Commericial&page=1
and this for commercial lease:
http://api.agentaccount.com/services/office_id/search?type=lease&property_type=retail&list_type=Commericial&page=1
Both requests return the same four listings (there are only four) – three have been entered for lease and one for sale.
The properties for lease have deal_type: lease and sell_type: lease, but the property for sale has deal_type: sale and sell_type: lease. Not sure what is going on here. Are you able to offer any advice?
I also have another request. The Date Available field doesn’t appear in the XML data for ResidentialLease properties. Can this be added please?
Regards,
Tony
Hi Team Zoo,
Have you had a chance to look at my last post regarding my problems with commercial listings and consider my request to add the Date Available field to the XML data?
Regards,
Tony
Hi Tony,
Based on your full url, there are some mistakes when you call it. The parameter that we added for search listing type is “listing_type” not “list_type”.
And also for the value, it should be “Commercial” not “Commericial”. Please try these url:
Commercial Sale:
http://api.agentaccount.com/services/office_id/search?type=sale&property_type=retail&listing_type=Commercial&page=1
Commercial Lease:
http://api.agentaccount.com/services/office_id/search?type=lease&property_type=retail&listing_type=Commercial&page=1
We also added Date Available in XML data, Please check it.
thanks
Thanks Team Zoo,
Oops, my mistake. Fantastic, everything works beautifully now.
Just one last detail – the property detail API doesn’t have the date_available field in the returned XML data.
Hi Tony,
We added date_available field to detail api. Now it is available in “property api”, “detail api” and “search api”
thanks
Hi Team Zoo,
Just noticed a little bug in the search API. When I search for listing_type=ResidentialLease, none of the bathrooms’ fields are filled in – they are always empty, even when there are bathrooms entered for the property. When I look at the property detail, the bathrooms field is filled in correctly.
Regards
Tony
Hi Tony,
Thank you for your information, we have fixed that problem. So now it is appearing in search api.
thanks
Fantastic, thanks to everyone in Team Zoo
Regards,
Tony
Hi Team Zoom,
Our client has noticed an issue with the results returned from the search API and the property details API. The problem is with the property photos.
Our client has updated the photos for a property, changing the original order of images. The photos are returned in the XML data via the property details API in the order that they have been set by our client through the Agentpoint dashboard.
However, in the listing XML data returned by the search API, the original photo is being returned, rather than the first photo in the list. There doesn’t appear to be any option in the dashboard to set the image that should appear in the listing, so I’m assuming that it should be the first image in the set. This would be preferable to the current situation.
Can you please look into this for me and let me know the outcome?
Best wishes for Xmas,
Tony
Hi Tony,
We have adjusted the ordering for image in this API. Now it will show the first position of image. Please Check it
thanks
Thanks Team, but something is wrong. I’m getting an error back when I try to access page 2 and page 3 of our houses for sale and the same for rural properties for sale.
Tony
I would like to show listings for all offices for a client… the API URL only seems to take an office ID. How do I get the API to return all listings for a client with multiple offices?
Thanks
David
At this point in time the API only allows you to pull data for 1 office this being that 95% of the sites using the API are single office apps/websites. We will however consider your feedback and look to include this in the next API updates
Hi Team Zoo
Happy New Year to all.
Our client is having a small problem with the image that comes up on one of their properties in the search API. The image is correct in the property details API. The property ID is 148450
The image url returned by the search is http://www.agentaccount.com/attachments/images/0885/4026/107324530ml1316503846_medium_thumb.jpg
which cannot be found.
The correct (first) image url returned by the property details API is http://img.agentaccount.com/1f15763335787b77dbf9cc688738acb2633274b5
Can you look into this for us and let us know the outcome?
Regards,
Tony
Dear Team Zoo,
Have you had a chance to look into the problem I reported in my last post (25) above regarding the incorrect thumbnail image being returned for one our client’s properties in a property search?
Our client has reported another issue with the commercial property search. Searching for Commercial listing_type and retail property_type returns the same four properties for type=sale and type=lease. Our client has three commercial properties listed for lease and one for sale. The URL’s are
http://api.agentaccount.com/services/1274/search?type=sale&property_type=retail&listing_type=Commercial&status=1,5&sort_by_price_asc=true&page=1
and
http://api.agentaccount.com/services/1274/search?type=lease&property_type=retail&listing_type=Commercial&status=1,5&sort_by_price_asc=true&page=1
Can you also investigate this issue and let me know the outcomes as soon as possible.
Regards,
Tony Blackett
Hi Team Zoo. Regarding the response on Jan 9 about only being able to search based on a Office ID, rather than a Client ID (for clients with multiple offices), are we able to currently separate Office IDs with a comma so this can be achieved?
Thanks
David
Hi again, is there any way we can get surrounding suburbs included in the search results?
David
We will need to adjust the API to act like that, I think it will take around 2 hours. I”ll need to ask the GM.
Hi Team Zoo,
I’m still waiting for a response to my issues detailed in 25 and 26 above. As my client is a paying customer of yours, they are expecting these problems to be resolved quickly. It is almost three weeks now since I first advised you about the issue explained in 25. Please advise as soon as possible.
Regards,
Tony
Tony are you talking about this – Thanks Team, but something is wrong. I’m getting an error back when I try to access page 2 and page 3 of our houses for sale and the same for rural properties for sale?
We made an adjustment for this so you should not be receiving an error. Can you advise if you are.
Hi John,
It seems that you can’t see my posts that I’m referring to as 25 and 26 – both are flagged as awaiting moderation. Here are my posts again:
on January 11, 2012 at 6:57 pm
Hi Team Zoo
Happy New Year to all.
Our client is having a small problem with the image that comes up on one of their properties in the search API. The image is correct in the property details API. The property ID is 148450
The image url returned by the search is http://www.agentaccount.com/attachments/images/0885/4026/107324530ml1316503846_medium_thumb.jpg
which cannot be found.
The first image url returned by the property details API is http://img.agentaccount.com/1f15763335787b77dbf9cc688738acb2633274b5
Can you look into this for us and let us know the outcome?
Regards,
Tony
on January 23, 2012 at 2:16 pm
Dear Team Zoo,
Have you had a chance to look into the problem I reported in my last post (25) above regarding the incorrect thumbnail image being returned for one our client’s properties in a property search?
Our client has reported another issue with the commercial property search. Searching for Commercial listing_type and retail property_type returns the same four properties for type=sale and type=lease. Our client has three commercial properties listed for lease and one for sale. The URL’s are
http://api.agentaccount.com/services/1274/search?type=sale&property_type=retail&listing_type=Commercial&status=1,5&sort_by_price_asc=true&page=1
and
http://api.agentaccount.com/services/1274/search?type=lease&property_type=retail&listing_type=Commercial&status=1,5&sort_by_price_asc=true&page=1
Can you also investigate this issue and let me know the outcomes as soon as possible.
Regards,
Tony Blackett
Hi Tony,
we have checked about your issues.
1. About image issue, we have fixed it. please check.
2. About commercial issue, please use “deal_type” not only “type” if you also specify for listing_type. So your url should like this
http://api.agentaccount.com/services/1274/search?deal_type=sale&property_type=retail&listing_type=Commercial&status=1,5&sort_by_price_asc=true&page=1
thanks
Hi John,
Thanks for that. My previous posts must have been stuck somewhere in the ether.
Our issues are now resolved. A change must have been made in the API, changing type to deal_type (it was type just before Xmas and it worked then too). It’s good now, a much clearer name for the sale/lease selection.
Regards,
Tony
Hi Team Zoo,
My client’s web site has been working very well for them, so congratulations.
I have had a request which has highlighted an issue that you might be able to help me with. When I make a property detail request using the API
/services/{OFFICE_ID}/property/{PROPERTY_ID}/detail
I am able to get properties that do not belong to the OFFICE_ID. i.e. for another agent.
I would have thought I’d only be able to access properties listed for the given OFFICE_ID and would get an error if I used a PROPERTY_ID listed by another agent.
Can you please look into this issue for me and get back to me as soon as possible?
Tony
Hi Tony,
Thanks for your feed back, we have fixed this issue. so It will only display property which belongs to the office for this api
/services/{OFFICE_ID}/property/{PROPERTY_ID}/detail . Please check it
thanks
Thanks Team, perfect.
Tony
Hello:
I am trying to use this API to search for property listings to display on my client’s PHP website but I keep getting a result “The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved.”.
This is the code I am using:
<?php
//Get data from specific API
//$base_url = URL of API
//$accesskey = accesskey for the API
//$privatekey = privatekey for the API
function getdata($base_url, $accesskey, $privatekey)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $base_url);
curl_setopt($ch, CURLOPT_USERPWD, $accesskey . ':'.$privatekey);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
}
$base_url="http://api.agentaccount.com/services/2304/search?listing_type=ResidentialSale&page=1";
$accesskey="”;
$privatekey=”";
getdata($base_url,$accesskey, $privatekey);
?>
Could you tell me what is happening? Why is this not working?
Thanks,
Arvind
Hi Arvind,
Please fill the access key and private key, they are compulsory. You can get the keys from developer page -> api detail
thanks
Thanks, I had put in the access key and private key – I just did them for this message. But it is resolved now because the client had not given me the correct office ID. Thanks for your help.
This is my first time pay a visit at here and i am in fact happy
to read everthing at single place.
I enjoy reading through an article that can make people think.
Also, thanks for permitting me to comment!
Woah! I’m really digging the template/theme of this website. It’s simple, yet effective.
A lot of times it’s tough to get that “perfect balance” between usability and visual appearance. I must say you have done a amazing job with this. Additionally, the blog loads extremely fast for me on Safari. Excellent Blog!