CallFire Solutions

All Calls API - Rest Reports (Legacy)

Follow

// URL to which the request must be sent
$mainUrl = "https://www.callfire.com/cloud/1/reports/calls/" . $campaignID;

// Parameters for the campaign finished notification subscription
$reportsParameters = array(
"apikey" => $apiKey,
"offset" => "0",
"startDate" => date("Ymd"),
"stopDate" => date("Ymd", strtotime("tomorrow"))
);

// Initialise and open the cURL connection
$reportsUrl = $mainUrl . "?" . http_build_query($reportsParameters);
$ch = curl_init($reportsUrl);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $reportsUrl);

// Execute the cURL request
$curlResponse = curl_exec($ch);

Have more questions? Submit a request

Comments