PHP code example of colling-media / sharpspring-api

1. Go to this page and download the library: Download colling-media/sharpspring-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

colling-media / sharpspring-api example snippets


$SharpSpring = new \AngeloPublio\SharpSpring(SHARPSPRING_ACCOUNTID, SHARPSPRING_SECRETKEY);

$limit = 500;                                                                         
$offset = 0;    
   
$result = $SharpSpring->call('getLeads', 
				array('where' => array('emailAddress' => 'email-to-filter@test.com'), 'limit' => $limit, 'offset' => $offset)
			);
print_r($result);


$SharpSpring = new \AngeloPublio\SharpSpring(SHARPSPRING_ACCOUNTID, SHARPSPRING_SECRETKEY);

$limit = 500;                                                                         
$offset = 0;    
   
$result = $SharpSpring->call('getFields', 
				array('where' => array(), 'limit' => $limit, 'offset' => $offset)
			);
print_r($result);