CallFire Solutions

Create Broadcast Schedule

Follow

CREATE BROADCAST SCHEDULE

Creates a new Schedule for a Broadcast

Broadcast can be set to run at scheduled times as prescribed by BroadcastSchedule. It allows setting start time, stop time, begin date, and day of week. It returns broadcastScheduleId that can be used in GetBroadcastSchedule and DeleteBroadcastSchedule.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
CreateBroadcastSchedule   Create BroadcastSchedule using attached info object
RequestId   anyURI
BroadcastId   long
BroadcastSchedule     object
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]

RESPONSE PARAMETERS

ParameterDescriptionData Type
CreatedId Unique ID of resource long

EXAMPLE


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string CreateBroadcastSchedule()
        {
            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.POST);
            request.AddParameter("StartTimeOfDay", "09:00:00");
            request.AddParameter("StopTimeOfDay", "17:00:00");
            request.AddParameter("TimeZone", "America/Los_Angeles");
            request.AddParameter("StartTimeOfDay", "2013-03-06-08:00");
            request.AddParameter("StopTimeOfDay", "2013-03-09-08:00");

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

The XML returned is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<r:ResourceReference xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

    <r:Id>171125003</r:Id>

<r:Location>https://www.callfire.com/api/1.1/rest/broadcast/schedule/171125003</r:Location>

</r:ResourceReference>

Have more questions? Submit a request

Comments