Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 732 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 732 Bytes

#Usage

require("RDStation.class.php");
$rdAPI = new RDStation("RD_PRIVATE_TOKEN", "RD_TOKEN");

//SEND NEW LEAD TO RD STATION
$return1 = $rdAPI->sendNewLead("[email protected]", array(
	"nome" => "Julio",
	"cargo" => "Cofounder",
	"empresa"=> "Agendor",
	"identificador" => "contact-form",
	"subscribe_newsletter" => true //custom data is accepted
));

//UPDATE LEAD STATUS TO 'won'
$return2 = $rdAPI->updateLeadStatus("[email protected]", 'won', 999.99);

//UPDATE LEAD STATUS TO 'lost'
$return3 = $rdAPI->updateLeadStatus("[email protected]", 'lost', 999.99, 'Lost reason');

//UPDATE LEAD FUNNEL STAGE AND OPPORTUNITY FLAG
$return4 = $rdAPI->updateLeadStageAndOpportunity("[email protected]", 1, true);