CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Get broadcast stats by broadcastId or by interval range. Stats include information like billed amount, billed duration, actions count, attempt count, etc...
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
GetBroadcastStats | BroadcastStats request by unique ID | object | |
Id | Unique ID of resource | long | |
IntervalBegin | Beginning of DateTime interval to search on | dateTime | |
IntervalEnd | End of DateTime interval to search on | dateTime |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
BroadcastStats | ||
UsageStats | ||
Duration | Duration of calls in seconds | int |
BilledDuration | Duration of calls billed in seconds | int |
BilledAmount | Billed credits | float |
Attempts | Attempted Texts and Calls | int |
Actions | Text and Calls placed | int |
ResultStat | ||
Result | [LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED, INVALID_NUMBER] | Result |
Attempts | Text and Calls attempted | int |
Actions | Text and Calls placed | int |
ActionStatistics | ||
Unattempted | int | |
RetryWait | int | |
Finished | int |
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and
* won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* GetBroadcastStats
*/
$request = new stdclass();
$request->Id = 3; // required
$response = $client->GetBroadcastStats($request);
print_r($response);
// Sample $response:
//
// stdClass Object (
// [UsageStats] => stdClass Object (
// [Duration] => 0
// [BilledDuration] => 0
// [BilledAmount] => 93.27
// [Attempts] => 3109
// [Actions] => 3109
// )
// [ResultStat] => Array(
// [0] => stdClass Object (
// [Result] => SENT
// [Attempts] => 3089
// [Actions] => 3089
// )
// [1] => stdClass Object (
// [Result] => RECEIVED
// [Attempts] => 20
// [Actions] => 20
// )
// )
// )
?>