iPhone & iPad API Extended
HTTP POST / GET facility
This API allows you to get the Access Key and Private Key from the zooproperty system by providing the username and password of a zooproperty account. Basically, this API can be used for ANY application which is required to request and read the Zoo Property database without knowing any zoo property key and can be combined with other zooproperty’s apis for authorization purpose.
1. For a developer user, you have to use sub domain in the url:
- http://usersdomain.agentaccount.com/api_login
eg:
- http://agentpoint.agentaccount.com/api_login?username=yourusername&password=yourpassword
2. For an agent user, you can use sub domain or not in the url:
- http://agentaccount.com/api_login?username=yourusername&password=yourpassword
Output:
<records type="array"><record><data><username>demouser</username><password>123456</password></data><error-fields/><error-message/><success type="boolean">true</success><keys><private-key>7abc1bd6d3bfe7016d79f6ba6f3de81d798ef923</private-key><access-key>5a948d2c983111cffdc80d247d3ba4fa0b2b0839</access-key><office-id type="integer">1</office-id><agent-id type="integer">1</agent-id></keys></record></records>
Parameter Descriptions
| Field | Description |
|---|---|
username |
Mandatory Field – VARCHAR(255) |
password |
Mandatory Field – VARCHAR(255) |
Accessing API
example in php code:
//sending Post data to specific API<?php// get data from userif(isset($_POST['username'])) $ username = $_POST['username'];if(isset($_POST['password'])) $ password = $_POST['password'];// send to API$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'http://agentpoint.agentaccount.com/api_login');curl_setopt ($ch, CURLOPT_POST, 1);curl_setopt ($ch, CURLOPT_POSTFIELDS, "username=$username&password=$password");curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_exec($ch);curl_close($ch);?>