CallFire Solutions

Query Contact Batches

Follow

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

ParameterDemo ValueDescriptionData 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

RESPONSE PARAMETERS

ParameterDescriptionData 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

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>

Have more questions? Submit a request

Comments