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.
Query for calls using standard ActionQuery which filters on
batchId, broadcastId, toNumber, etc... Returns a list of calls and
all associated info. See GetCall
to return just a single call action by id.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
QueryCalls | Calls request by query | object | |
MaxResults | Max number of results to return limited to 1000 (default: 1000) | long | |
FirstResult | Start of next result set (default: 0) | long | |
BroadcastId | BroadcastId to query on | long | |
BatchId | BatchId to query on | long | |
State | List of Action States to query on[READY, SELECTED, CALLBACK, DISABLED, SKIPPED, FINISHED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT, RESTRICTED_NUMBER] | List[ActionState] | |
Result | List of Results to query on[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] | List[Result] | |
Inbound | Is call inbound | boolean | |
IntervalBegin | Beginning of DateTime interval to search on | dateTime | |
IntervalEnd | End of DateTime interval to search on | dateTime | |
FromNumber | E.164 11 digit number | PhoneNumber | |
ToNumber | E.164 11 digit number | List[PhoneNumber] | |
LabelName | Label that result must have to be included | string |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
CallQueryResult | List of Calls returned from query | |
TotalResults | Results count | long |
Call | Call Information | |
id | Unique ID of action | long |
FromNumber | E.164 11 digit number or short code | PhoneNumber |
ToNumber | List of E.164 11 digit numbers space seperated | List[PhoneNumber] |
State | Current State of Action[READY, SELECTED, CALLBACK, DISABLED, SKIPPED, FINISHED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT, RESTRICTED_NUMBER] | ActionState |
BatchId | Unique ID of Batch associated with Action | long |
BroadcastId | Unique ID of Broadcast associated with Action | long |
ContactId | Unique ID of Contact associated with Action | long |
Inbound | Is inbound Action | boolean |
Created | DateTime Action was created 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime |
Modified | DateTime Action was modified 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' | dateTime |
FinalResult | [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 |
Label | ||
Name | string | |
CallRecord | ||
id | long | |
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 |
FinishTime | DateTime action finished in 'CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]' format | dateTime |
BilledAmount | Credits charged for call or text | float |
QuestionResponse | Question / Response pair defined in IVR campaign with 'stash'. | |
Question | IVR stash 'varname' | string |
Response | IVR stash value associated with 'varname' | string |
SwitchId | string | |
CallerName | string | |
OriginateTime | dateTime | |
AnswerTime | dateTime | |
Duration | Duration of call in seconds | int |
RecordingMeta | Recordings are audio recorded during a call. | |
id | long | |
Name | string | |
Created | dateTime | |
LengthInSeconds | int | |
Link | string | |
Note | ||
Text | string | |
Created | dateTime | |
Note | ||
Text | string | |
Created | dateTime | |
AgentCall | boolean |
<?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'));
/**
* QueryCalls. Determine status of calls filtered by BroadcastId, BatchId, etc...
*/
$query = new stdclass();
$query->MaxResults = 100; // long
$query->FirstResult = 0; // long
$query->BroadcastId = 327; // long
$response = $client->QueryCalls($query);
print_r($response);
// Sample $response:
//
// stdClass Object (
// [TotalResults] => 1
// [Call] => stdClass Object (
// [FromNumber] => 13105551212
// [ToNumber] => stdClass Object (
// [_] => 18185551212
// )
// [State] => INVALID
// [BatchId] => 331
// [BroadcastId] => 332
// [ContactId] => 4422
// [Inbound] =>
// [Created] => 2013-03-07T12:01:59-08:00
// [Modified] => 2013-03-07T12:01:59-08:00
// [id] => 9652
// )
// )
?>