CallFire Solutions

Query Broadcast Schedule

Follow

QUERY BROADCAST SCHEDULE

Lists existing BroadcastSchedules

This operation lists information about Broadcast Schedules attached to a Broadcast.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
QueryBroadcastSchedules   BroadcastSchedules 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
BroadcastScheduleQueryResult List of BroadcastSchedules returned from query  
TotalResults Results count long
BroadcastSchedule    
Id Unique ID of Broadcast Schedule long
StartTimeOfDay Earliest time a client can be contacted in the timezone associated with the number's NPA/NXX time
StopTimeOfDay Latest time a client can be contacted in the timezone associated with the number's NPA/NXX time
TimeZone Time Zone string
BeginDate Start date of Campaign date
EndDate End date of Campaign date
DaysOfWeek [SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY] List[DayOfWeek]

EXAMPLE



using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string QueryBroadcastSchedule()
        {
            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}/schedule", broadcastId), Method.GET);
            request.AddParameter("MaxResults", "100");
            request.AddParameter("FirstResult", "21");
            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">

    <BroadcastSchedule id="171125003">

       <StartTimeOfDay>09:00:00Z</StartTimeOfDay>

       <StopTimeOfDay>17:00:00Z</StopTimeOfDay>

       <TimeZone>America/Los_Angeles</TimeZone>

       <BeginDate>2015-03-01Z</BeginDate>

       <EndDate>2015-03-09Z</EndDate>

       <DaysOfWeek>SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY</DaysOfWeek>

    </BroadcastSchedule>

</r:ResourceList>

Have more questions? Submit a request

Comments