QUERY BROADCAST SCHEDULE

Lists existing BroadcastSchedules

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

REQUEST PARAMETERS

Parameter Data Type Demo Value Description
QueryBroadcastSchedules object BroadcastSchedules 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 Unique ID of Broadcast

RESPONSE PARAMETERS

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

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>