Property Page Views via HTTP
This API allows you to submit page views for properties back into the Zoo Property system. These page views can be seen in the “Notes” section for a property and can be broken down in relation to the source of the page view. eg Office Website, Mobile Phone Site, iPad Site, facebook Application etc.
HTTP Get facility
1) For adding a viewer to zoo agents
Output:
<records type="array"><record><success type="boolean">true</success><total type="integer">1</total><errors/></record></records>
Parameter Descriptions
agent_id |
This corresponds to the ID of the agent. |
office_id |
This corresponds to the ID of the office. |
property_id |
This corresponds to the ID of the property. |
type_id |
Mandatory Field – integer(11) The “type” of property viewer access come from type_id = 1 → Office Website type_id = 2 → Individual Property Website type_id = 3 → Individual Agent Website type_id = 4 → Mobile Phone Website type_id = 5 → Iphone Application type_id = 6 → Facebook Application |
ip_address |
VARCHAR(50) |
NB:
agent_id,office_id, andproperty_idmust be defined.type_idmust be defined according the type/device
2) To see the total views for a property
Output:
<records type="array"><record><total type="integer">2</total><errors> </errors><success type="boolean">true</success></record></records>
Accessing the API
All data remitted is protected by an Access and Private Key so you will need these api keys for each office. These API keys can be found in the API page of your Developer’s System.
example of php code:
- To access the API include this code in the page which receives data from the contact form and complete these parameters:
- Access Key:
5a948d2c983111cffdc80d247d3ba4fa0b2b0839 - Private Key:
7abc1bd6d3bfe7016d79f6ba6f3de81d798ef923 //sending GET data to specific API<?php$accesskey= “5a948d2c983111cffdc80d247d3ba4fa0b2b0839”$privatekey= “7abc1bd6d3bfe7016d79f6ba6f3de81d798ef923”// send to API$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'http://agentpoint.agentaccount.com/agents/1/offices/1/properties/18320/property_notes/set_viewer?type_id=2&ip_address=127.0.0.1');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);curl_exec($ch);curl_close($ch);?>
This is really fascinating, You are a very skilled blogger. I have joined your rss feed and stay up for searching for extra of your fantastic post. Additionally, I have shared your site in my social networks