Property Data via HTTP
This API allows you to remit property data into Zoo Property via HTTP.
Property API For Update Opentimes of Property
Property API For Update Status Property
Property API For Residential Sale
Property API For Residential Lease
Property API For Holiday Lease
Property API For Commercial
Property API For Project Sale
My developer is having trouble using the API from above:
Property API For Commercial
* Click here to download Property API For Commercial
The word doc download that he got when clicking on that link is what he used to prepare API for commercial properties.
This code is simple test code.
This code is for inserting new record.
But this code said “Deal type : Sale/Lease can’t be blank false”
As you know via code, deal_type is not blank.
How can I explain about this issue?
==============OUR CODE==========
But this code said “Deal type : Sale/Lease can’t be blank false”
As you know via code, deal_type is not blank.
How can I explain about this issue?
< ?php
$accesskey= 'any access key';
$privatekey= 'any private key';
$listing_type="commercial";
$country="Australia";
$suburb="SYDNEY";
$state="NSW";
$zipcode="2000";
$street_number=112;
$street="nnn";
$property_type="Farmland";
$headline="TiltleHedadminlinsdinlk";
$description="RoyisTest";
$price=1000;
$deal_type = "for sale";
//$deal_type = "Sale";
$primary_contact_id="9665";
$params = "deal_type=$deal_type&listing_type=$listing_type&country=$country&suburb=$suburb&state=$state&zipcode=$zipcode&street_number=$street_number&street=$street&property_type=$property_type&headline=$headline&description=$description&price=$price&primary_contact_id=$primary_contact_id";
echo $params."”;
// send to API
$ch = curl_init();
//print_r($ch);
//curl_setopt ($ch, CURLOPT_URL, ‘any url’);
curl_setopt ($ch, CURLOPT_URL, ‘any url’);
//curl_setopt ($ch, CURLOPT_URL, ‘any url’);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
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);
echo “”;
$r = curl_exec ($ch);
print_r($r);
curl_close ($ch);
?>
============END OUR CODE===========
Please advise on how to correct.
Cheers
Barry
Please advise why we get error message (“Deal type : Sale/Lease can’t be blank false”). See code in comment above:
As you know via code, deal_type is not blank.
Can you please explain about this issue?
Hi barry,
Deal type only allowed for these value “Sale”, “Lease”, “Both” , but in your code $deal_type = “for sale”;
please change the value
thanks
We have tried as you suggested and still get error.
Please advise…
Barry,
There was a bug in the API because of updates to the Commercial Listig template. These have now been fixed.
thanks.
Good blog.
And thanks.
Could you explain how to update the record via http?
I can not find any document about it.
Thanks again.
To I get is how to detect id of records and how to select id of record when add record.
You said in document, id field is only for update.
But in this case, developer must detect id field.
Could you let me know the way to change id or detect id?
Best Regards,
Please advice how to change id or detect id.
maybe there is no way to change id or detect id?
You need to use the Zoo id which is assigned to a property when a property is added. If the ID you use does not belong to a property in your office then a new property will be added to the office. If the id does belong to a property then the existing property will be updated.
You can download a csv file in the tools section of the Agents System in the office the properties belong to. That csv will have the zoo id for all properties in the office.
Regards
Thanks for reply
$params = “Id=”1000″&deal_type=$deal_type&listing_type=$listing_type&country=$country&suburb=$suburb&state=$state&zipcode=$zipcode&street_number=$street_number&street=$street&property_type=$property_type&headline=$headline&description=$description&price=$price&primary_contact_id=$primary_contact_id”;
curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
In this case, property’s id should be 1000, right?
But Property’s id seems random value.
Could you explain more?
Best Regards,
You can’t create a listing with a custom id as the system will generate the id when the listing is added. To add a new listing just leave it blank and for existing properties fill it with the zoo id.
Regards
ok
Then, could you let me know the way how to get the id that most recently added?
Thanks
If I develop your API, I will make the api’s return value to id
It is possible?
It is possible by inserting one line to your api’s last line.
Eg, echo $id;
true
1234 –> generated id by zoo
…..
Really?
Great team zoo
It is just my small suggestion.
But haha.
Thanks
I have another issue more.
http://aaa.agentaccount.com/agents/1/offices/1/properties/1/media
I was going to import image urls to zoo property.
Could you explain how to add image urls ?
please any advise ;(
What method are you trying to import images via? With the xml you just add links and the same with the csv?
Ryan
it is HTTP method.
It is impossible to use http method?