| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/Campaign/{CampaignId} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Campaign |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class Campaign
Public Overridable Property CampaignId As Integer
Public Overridable Property CampaignTypeId As Integer
Public Overridable Property CampaignName As String
Public Overridable Property AgentID As Integer
Public Overridable Property Subject As String
Public Overridable Property Template As String
Public Overridable Property DateCreated As Date?
Public Overridable Property DateDeleted As Date?
Public Overridable Property Frequency As String
Public Overridable Property StartDate As Date
Public Overridable Property TimeOfDay As TimeSpan?
Public Overridable Property LastRunAtUtc As Date?
Public Overridable Property NextRunAtUtc As Date?
Public Overridable Property TimeZoneId As String
Public Overridable Property DayOfWeek As DayOfWeek?
Public Overridable Property DayOfMonth As Byte?
Public Overridable Property IsActive As Boolean
Public Overridable Property CreatedUtc As Date?
Public Overridable Property UpdatedUtc As Date?
Public Overridable Property Channels As DeliveryChannel
End Class
Public Partial Class CampaignExtended
Inherits Campaign
Public Overridable Property CampaignType As String
Public Overridable Property AgentName As String
End Class
Public Partial Class CampaignRequest
Public Overridable Property CampaignId As Integer
Public Overridable Property Campaign As List(Of Campaign) = New List(Of Campaign)
End Class
Public Partial Class CampaignResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Campaign As List(Of CampaignExtended) = New List(Of CampaignExtended)
End Class
<Flags>
Public Enum DeliveryChannel
None = 0
Email = 1
Sms = 2
End Enum
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"CampaignId":0,"Campaign":[{"CampaignId":0,"CampaignTypeId":0,"CampaignName":"String","AgentID":0,"Subject":"String","Template":"String","DateCreated":"0001-01-01T00:00:00.0000000","DateDeleted":"0001-01-01T00:00:00.0000000","Frequency":"String","StartDate":"0001-01-01T00:00:00.0000000","TimeOfDay":"PT0S","LastRunAtUtc":"0001-01-01T00:00:00.0000000","NextRunAtUtc":"0001-01-01T00:00:00.0000000","TimeZoneId":"String","DayOfWeek":"Sunday","DayOfMonth":0,"IsActive":false,"CreatedUtc":"0001-01-01T00:00:00.0000000","UpdatedUtc":"0001-01-01T00:00:00.0000000","Channels":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
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-01T00:00:00.0000000","DateDeleted":"0001-01-01T00:00:00.0000000","Frequency":"String","StartDate":"0001-01-01T00:00:00.0000000","TimeOfDay":"PT0S","LastRunAtUtc":"0001-01-01T00:00:00.0000000","NextRunAtUtc":"0001-01-01T00:00:00.0000000","TimeZoneId":"String","DayOfWeek":"Sunday","DayOfMonth":0,"IsActive":false,"CreatedUtc":"0001-01-01T00:00:00.0000000","UpdatedUtc":"0001-01-01T00:00:00.0000000","Channels":0}]}