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. Also ability to add or modify single leads.
leadID
optional The ID of a lead.// access URL and request method $url = 'https://api.idxbroker.com/leads/lead'; $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;
// 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.// access URL and request method $url = 'https://api.idxbroker.com/leads/note/1/1'; $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.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'; $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.noteID
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.// access URL and request method $url = 'https://api.idxbroker.com/leads/property/1/1'; $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.noteID
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;