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.
Return list of Contact Batches associated with this Broadcast. The contactBatchIds returned from this campaign can then be used to enable, disable, or delete the individual Batches.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
QueryContactBatches | ContactBatches 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 | Unique ID of Broadcast | long |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
ContactBatchQueryResult | List of ContactBatches returned from query | |
TotalResults | Results count | long |
ContactBatch | ||
id | long | |
Name | Name of Contact Batch | string |
Status | [NEW, VALIDATING, ERRORS, SOURCE_ERROR, ACTIVE] | BatchStatus |
BroadcastId | ID of Broadcast this Batch is attached to | long |
Created | dateTime | |
Size | Contact count in this Batch | int |
Remaining | 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'));
/**
* QueryContactBatches
*/
$query = new stdclass();
$query->MaxResults = 2;
$query->FirstResult = 0;
$query->BroadcastId = 3; // required
$response = $client->QueryContactBatches($query);
print_r($response);
// Sample $response:
//
// stdClass Object (
// [TotalResults] => 2
// [ContactBatch] => Array(
// [0] => stdClass Object (
// [Name] => CF3 Outbound Text Sample
// [Status] => ACTIVE
// [BroadcastId] => 3
// [Created] => 2011-05-15T17:43:00-07:00
// [Size] => 6198
// [Remaining] => 0
// [id] => 2
// )
// [1] => stdClass Object (
// [Name] => My Test API ContactBatch Numbers List
// [Status] => ACTIVE
// [BroadcastId] => 3
// [Created] => 2013-03-08T09:51:08-08:00
// [Size] => 2
// [Remaining] => 0
// [id] => 332
// )
// )
// )
?>