Skip to main content
EMS Software, LLC

AddEventWithMultipleDates (Requires Advanced API Option)

Description

Allows you to add an Event.

 

Request Parameters

Name

Description

Type

UserName

MC User Name

String

Password

MC User Password

String

Dates

List of Event Dates

DateTime Array

Calendars

Calendar Ids

Integer Array

Title

Event Name

String

TitleURL

EventTitleUrl

String

Description

Event Description

String

TimeEventStart

Time Event Starts

DateTime

TimeEventEnd

Time Event Ends

DateTime

Location

Event Location

String

LocationURL

Event Location URL

String

ContactName

Event Contact Name

String

ContactEmail

Event Contact Email

String

ContactPhone

Event Contact Phone

String

IsAllDayEvent

Is Event All Day

Boolean

IsUntimed

Is Event a timed event

Boolean

NoEndTime

Event has no end time

Boolean

Canceled

Event Cancelled

Boolean

CustomFieldLabel1

Event Custom Field Label 1

String

CustomFieldDescription1

Event Custom Field  Description 1

String

CustomFieldUrl1

Event Custom Field Url 1

String

CustomFieldLabel2

Event Custom Field  Label 2

String

CustomFieldDescription2

Event Custom Field  Description 2

String

CustomFieldUrl2

Event Custom Field Url 2

String

EventTypeID

EventTypeID

Integer

Department

Event Department

String

HideContactName

Hide Event Contact Name

Boolean

HIdeContactEmail

Hide Event Contact Email

Boolean

HIdeContactPhone

Hide Event Contact Phone

Boolean

 

Response Elements

Name

Description

Type

EventID

EventID

Integer

EventDetailID

Event Detail ID

Integer

 

Sample Code

 

 private void AddEventWithMultipleDates()

 {

        MCAPI.MCAPIService svc = new MCAPI.MCAPIService();         svc.Url = "http://yourserver/MCAPI/MCAPIService.asmx?WSDL";

        

       DateTime[] dates = new DateTime[] { DateTime.Now, DateTime.Now.AddDays(1) };        int[] cals = new int[] { 3, 126 };

 

       StringReader sr = new StringReader(svc.AddEventWithMultipleDates("username", "pwd", dates, cals, "Test API Event","", "This is a test api description", “1/1/1900    00:00”, “1/1/1900    00:00”, "Denver", "http://www.dea.com", "Contact Name", "Contact Email", "", false, false, false,  false,"","","","","","",-1, "", false, false, true));

 

      

       DataSet ds = new DataSet();

        

        System.Xml.XmlDocument doc = new System.Xml.XmlDocument();         doc.LoadXml(sr.ReadToEnd());

        ds.ReadXml(new System.Xml.XmlNodeReader(doc));

 

 }

 

Example Response

<NewDataSet>
 <Data>
   <EventID>25584</EventID>
   <EventDetailID>193593</EventDetailID>
 </Data>
 <Data>
   <EventID>25584</EventID>
   <EventDetailID>193594</EventDetailID>
 </Data>
 <Data>
   <EventID>25584</EventID>
   <EventDetailID>193595</EventDetailID>
 </Data>
</NewDataSet>