require_once('MetricWiseAPI.php');
$mwapi = new MetricWiseAPI();
$mwapi->setHostname('https://api-XXX.metricwise.net');
$mwapi->setUsername('MarketingPartner');
$mwapi->setAccessKey('secretKey'); # Governs system access
$mwapi->setApiKey('secretApi'); # Governs rate limiting
$lead = array(
'leadsource' => 'Internet',
'leadstatus' => 'Hot',
'description' => 'Lead is interested in...',
'firstname' => 'Jon',
'lastname' => 'Doe', # Required field
'lane' => '123 Main St',
'city' => 'Small Town',
'code' => '12345',
'email' => '[email protected]',
'phone' => '5558675309',
);
if (!$mwapi->submitLead()) {
echo $mwapi->getError();
} else {
echo 'OK';
}
metricwise / metricwise-api-php Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License