Client level API for accessing a client's leads and lead information.
endpoint: https://api.idxbroker.com/leads/[...]
This is a simple, access anywhere, method for getting a list of all API components available.
// access URL and request method $url = 'https://api.idxbroker.com/leads/listcomponents'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $components = json_decode($response,true); else $error = $code;
A simple method for listing all available methods in the current API component. This method will also list which request methods (GET, PUT, POST, or DELETE) are supported by each method.
// access URL and request method $url = 'https://api.idxbroker.com/leads/listmethods'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
Get information for one or multiple leads during a specified time frame of up to 1 week. Also ability to add or modify single leads.
leadID
optional The ID of a lead.interval
optional - the number of hours worth of data to return.
1.5
.0.0166
(~ 1 minute). Maximum value: 168
(1 week).
startDatetime
optional - the date and time to from which the interval counts back.
2013-01-01 23:59:59
. This will pull data from the very end of the day to 24 hours previous.YYYY-MM-DD hh:mm:ss
dateType
optional - there are several dates associated with a lead, this will specify what is being used to return information.
rf
optional array of fields to return in the output
// access URL and request method $url = 'https://api.idxbroker.com/leads/lead?interval=24&startDatetime=2012-01-01+23:59:59&dateType=subscribeDate'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.// access URL and request method $url = 'https://api.idxbroker.com/leads/lead/1'; $data = array( 'firstName'=>'Aaron', 'lastName'=>'Aaronson', 'email'=>'aaaaaaaaaronson@fake-email.com' ); $data = http_build_query($data); // encode and & delineate $method = 'POST'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
// access URL and request method $url = 'https://api.idxbroker.com/leads/lead'; $data = array( 'firstName'=>'Aaron', 'lastName'=>'Aaronson', 'email'=>'aaaaaaaaaronson@fake-email.com' ); $data = http_build_query($data); // encode and & delineate $method = 'PUT'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.// access URL and request method $url = 'https://api.idxbroker.com/leads/lead/123'; $method = 'DELETE'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
// access URL and request method $url = 'https://api.idxbroker.com/leads/bulklead'; $data = array( 'firstName[0]'=>'Aaron', 'lastName[0]'=>'Aaronson', 'email[0]'=>'aaaaaaaaaronson@fake-email.com', 'firstName[1]'=>'Alan', 'lastName[1]'=>'Aaronson', 'email[1]'=>'alanaaronson@fake-site.com' ); $data = http_build_query($data); // encode and & delineate $method = 'PUT'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
Get, create or modify the notes that are stored about a lead.
leadID
required The ID of a lead.noteID
optional The ID of a lead's note.interval
optional - the number of hours worth of data to return.
1.5
.0.0166
(~ 1 minute). Maximum value: 168
(1 week).
startDatetime
optional - the date and time to from which the interval counts back.
2013-01-01 23:59:59
. This will pull data from the very end of the day to 24 hours previous.YYYY-MM-DD hh:mm:ss
dateType
optional - there are several dates associated with a lead note, this will specify what is being used to return information.
rf
optional array of fields to return in the output
// access URL and request method $url = 'https://api.idxbroker.com/leads/note/1/1?interval=24&startDatetime=2012-01-01+23:59:59&dateType=created'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.noteID
required The ID of a lead's note.// access URL and request method $url = 'https://api.idxbroker.com/leads/note/1/1'; $data = array( 'note'=>'Loves almonds' ); $data = http_build_query($data); // encode and & delineate $method = 'POST'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.// access URL and request method $url = 'https://api.idxbroker.com/leads/note/1'; $data = array( 'note'=>'Smells like vanilla' ); $data = http_build_query($data); // encode and & delineate $method = 'PUT'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.noteID
required The ID of the note to delete.// access URL and request method $url = 'https://api.idxbroker.com/leads/note/1/1'; $method = 'DELETE'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
Get, create or modify the saved searches (which power property updates) that are stored about a lead.
leadID
required The ID of a lead.searchID
optional The ID of a lead's search.interval
optional - the number of hours worth of data to return.
1.5
.0.0166
(~ 1 minute). Maximum value: 168
(1 week).
startDatetime
optional - the date and time to from which the interval counts back.
2013-01-01 23:59:59
. This will pull data from the very end of the day to 24 hours previous.YYYY-MM-DD hh:mm:ss
dateType
optional - there are several dates associated with a lead search, this will specify what is being used to return information.
rf
optional array of fields to return in the output
searchInformation
that contains all existing saved search information. The key info
will return
messages about any returned saved search. Currently this info will tell you if any search's advanced fields are not valid in the IDX system.// access URL and request method $url = 'https://api.idxbroker.com/leads/search/1/1?interval=24&startDatetime=2012-01-01+23:59:59&dateType=created'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.searchID
required The ID of a lead's saved search....&search[idxID]=a001&search['listingID']=1234
// access URL and request method $url = 'https://api.idxbroker.com/leads/search/1/1'; $data = array( 'searchName'=>'Good_side_of_tracks', 'search'=>array('idxID'=>'a001','hp'=>200000) ); $data = http_build_query($data); // encode and & delineate $method = 'POST'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead....&search[idxID]=a001&search['listingID']=1234
// access URL and request method $url = 'https://api.idxbroker.com/leads/search/1'; $data = array( 'searchName'=>'Good_side_of_tracks', 'search'=>array('idxID'=>'a001','hp'=>200000) ); $data = http_build_query($data); // encode and & delineate $method = 'PUT'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.searchID
required The ID of the search to delete.// access URL and request method $url = 'https://api.idxbroker.com/leads/search/1/1'; $method = 'DELETE'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
Get, create or modify the saved properties (which power property updates) that are stored for a lead.
leadID
required The ID of a lead.propertyID
optional The ID of a lead's saved property.interval
optional - the number of hours worth of data to return.
1.5
.0.0166
(~ 1 minute). Maximum value: 168
(1 week).
startDatetime
optional - the date and time to from which the interval counts back.
2013-01-01 23:59:59
. This will pull data from the very end of the day to 24 hours previous.YYYY-MM-DD hh:mm:ss
dateType
optional - there are several dates associated with a lead's saved property, this will specify what is being used to return information.
rf
optional array of fields to return in the output
// access URL and request method $url = 'https://api.idxbroker.com/leads/property/1/1?interval=24&startDatetime=2012-01-01+23:59:59&dateType=created'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.propertyID
required The ID of a lead's saved property....&property[idxID]=a001&property[listingID]=1234
// access URL and request method $url = 'https://api.idxbroker.com/leads/property/1/1'; $data = array( 'propertyName'=>'mansion', 'property'=>array('idxID'=>'a001','listingID'=>2345678) ); $data = http_build_query($data); // encode and & delineate $method = 'POST'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead....&property[idxID]=a001&property[listingID]=1234
// access URL and request method $url = 'https://api.idxbroker.com/leads/property/1'; $data = array( 'propertyName'=>'ruins', 'property'=>array('idxID'=>'a001','listingID'=>345678) ); $data = http_build_query($data); // encode and & delineate $method = 'PUT'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // send the data curl_setopt($handle, CURLOPT_POSTFIELDS, $data); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
leadID
required The ID of a lead.propertyID
required The ID of the property to delete.// access URL and request method $url = 'https://api.idxbroker.com/leads/property/1/1'; $method = 'DELETE'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); if ($method != 'GET') curl_setopt($handle, CURLOPT_CUSTOMREQUEST, $method); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $response = json_decode($response,true); else $error = $code;
Get traffic history for a specified lead during a specified time frame of up to 1 year.
leadID
required The ID of a leadinterval
optional - the number of hours worth of data to return.
1.5
.0.0166
(~ 1 minute). Maximum value: 168
(1 week).
startDatetime
optional - the date and time to from which the interval counts back.
2013-01-01 23:59:59
. This will pull data from the very end of the day to 24 hours previous.YYYY-MM-DD hh:mm:ss
rf
optional array of fields to return in the output
// access URL and request method $url = 'https://api.idxbroker.com/leads/leadtraffic/1?interval=24&startDatetime=2012-01-01+23:59:59'; $method = 'GET'; // headers (required and optional) $headers = array( 'Content-Type: application/x-www-form-urlencoded', // required 'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own 'outputtype: json' // optional - overrides the preferences in our API control page ); // set up cURL $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false); // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference $response = curl_exec($handle); $code = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($code >= 200 || $code < 300) $properties = json_decode($response,true); else $error = $code;