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.
List all calls and texts associated with a contact.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
GetContactHistory | ContactHistory request by unique ID | object | |
MaxResults | Max number of results to return limited to 1000 (default: 1000) | long | |
FirstResult | Start of next result set (default: 0) | long | |
ContactId | Contact to get history | long |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
ContactHistory | List Calls or Texts associated with Contact | |
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 | |
Text | ||
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 | |
Message | string | |
TextRecord | ||
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 | |
Message | string |
<?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'));
/**
* GetContactHistory.
*/
$request = new stdClass();
$request->ContactId = 3; // long required
$response = $client->GetContactHistory($request);
print_r($response);
?>