QUERY CONTACT BATCHES

Lists a Broadcast's ContactBatch

Return the 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 Data Type Demo Value Description
QueryContactBatches object ContactBatches request by query
MaxResults long 1000 Max number of results to return limited to 1000 (default: 1000)
FirstResult long 0 Start of next result set (default: 0)
BroadcastId long 0 Unique ID of Broadcast

RESPONSE PARAMETERS

Parameter Data Type Description
ContactBatchQueryResult List of ContactBatches returned from query
TotalResults long Results count
ContactBatch
Id long
Name string Name of Contact Batch
Status BatchStatus [NEW, VALIDATING, ERRORS, SOURCE_ERROR, ACTIVE]
BroadcastId long ID of Broadcast this Batch is attached to
Created dateTime
Size int Contact count in this Batch
Remaining int

EXAMPLE

using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string QueryContactBatch()
        {
            long broadcastId = 18; //Your Broadcast Id here

            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest(string.Format("broadcast/{0}/batch",broadcastId), Method.GET);
            request.AddParameter("MaxResults", "5");
            request.AddParameter("FirstResult", "0");
            request.AddParameter("BroadcastId", "18");

            var response = client.Execute(request);
            string content = response.Content;
            return content;
        }
    }
}

The XML returned is:

<r:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="1">

    <ContactBatch id="2054619003">

       <Name>ContactBatchName</Name>

       <Status>ACTIVE</Status>

       <BroadcastId>1902607001</BroadcastId>

       <Created>2014-12-16T12:39:04Z</Created>

       <Size>2</Size>

       <Remaining>0</Remaining>

    </ContactBatch>

</r:ResourceList>