Trendsic Platform Service

<back to all web services

CampaignRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Campaign/{CampaignId}
GET,POST,PUT,DELETE,OPTIONS/v1/Campaign
CampaignRequest Parameters:
NameParameterData TypeRequiredDescription
CampaignIdpathintNo
CampaignbodyList<Campaign>No
Campaign Parameters:
NameParameterData TypeRequiredDescription
CampaignIdformintNo
CampaignTypeIdformintNo
CampaignNameformstringNo
AgentIDformintNo
SubjectformstringNo
TemplateformstringNo
DateCreatedformDateTime?No
DateDeletedformDateTime?No
FrequencyformstringNo
StartDateformDateTimeNo
TimeOfDayformTimeSpan?No
LastRunAtUtcformDateTime?No
NextRunAtUtcformDateTime?No
TimeZoneIdformstringNo
DayOfWeekformDayOfWeek?No
DayOfMonthformbyte?No
IsActiveformboolNo
CreatedUtcformDateTime?No
UpdatedUtcformDateTime?No
ChannelsformDeliveryChannelNo
DeliveryChannel Enum:
NameValue
None0
Email1
Sms2
CampaignResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
CampaignformList<CampaignExtended>No
CampaignExtended Parameters:
NameParameterData TypeRequiredDescription
CampaignTypeformstringNo
AgentNameformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/Campaign/{CampaignId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CampaignId: 0,
	Campaign: 
	[
		{
			CampaignId: 0,
			CampaignTypeId: 0,
			CampaignName: String,
			AgentID: 0,
			Subject: String,
			Template: String,
			DateCreated: 0001-01-01,
			DateDeleted: 0001-01-01,
			Frequency: String,
			StartDate: 0001-01-01,
			TimeOfDay: PT0S,
			LastRunAtUtc: 0001-01-01,
			NextRunAtUtc: 0001-01-01,
			TimeZoneId: String,
			DayOfWeek: Sunday,
			DayOfMonth: 0,
			IsActive: False,
			CreatedUtc: 0001-01-01,
			UpdatedUtc: 0001-01-01,
			Channels: 0
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Campaign: 
	[
		{
			CampaignType: String,
			AgentName: String,
			CampaignId: 0,
			CampaignTypeId: 0,
			CampaignName: String,
			AgentID: 0,
			Subject: String,
			Template: String,
			DateCreated: 0001-01-01,
			DateDeleted: 0001-01-01,
			Frequency: String,
			StartDate: 0001-01-01,
			TimeOfDay: PT0S,
			LastRunAtUtc: 0001-01-01,
			NextRunAtUtc: 0001-01-01,
			TimeZoneId: String,
			DayOfWeek: Sunday,
			DayOfMonth: 0,
			IsActive: False,
			CreatedUtc: 0001-01-01,
			UpdatedUtc: 0001-01-01,
			Channels: 0
		}
	]
}