TicketUserServices

<back to all web services

CampaignConversionRunRequest

The following routes are available for this service:
POST/CampaignConversions/Run
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel

Namespace Global

    Namespace TicketUserServices.ServiceModel

        Public Partial Class CampaignConversionPerson
            Public Overridable Property Phone As String
            Public Overridable Property Email As String
            Public Overridable Property RecipientId As Nullable(Of Integer)
            Public Overridable Property Channel As String
            Public Overridable Property SentAt As Date
        End Class

        Public Partial Class CampaignConversionResult
            Public Sub New()
                BySurface = New List(Of CampaignConversionSurfaceCount)
                ByChannel = New List(Of CampaignConversionSurfaceCount)
                Notes = New List(Of String)
            End Sub

            Public Overridable Property RunId As String
            Public Overridable Property PeopleMeasured As Integer
            Public Overridable Property PeopleConverted As Integer
            Public Overridable Property TotalAmount As Decimal
            Public Overridable Property BySurface As List(Of CampaignConversionSurfaceCount)
            Public Overridable Property ByChannel As List(Of CampaignConversionSurfaceCount)
            Public Overridable Property HeadlineConversions As Integer
            Public Overridable Property HeadlineAmount As Decimal
            Public Overridable Property MedianHoursToConvert As Integer
            Public Overridable Property Notes As List(Of String)
            Public Overridable Property StatusCode As Integer
            Public Overridable Property Message As String
        End Class

        Public Partial Class CampaignConversionRunRequest
            Public Sub New()
                People = New List(Of CampaignConversionPerson)
            End Sub

            Public Overridable Property CampaignId As Integer
            Public Overridable Property People As List(Of CampaignConversionPerson)
            Public Overridable Property WindowHours As Integer
            Public Overridable Property TargetEventId As Nullable(Of Integer)
            Public Overridable Property IncludeFood As Boolean
        End Class

        Public Partial Class CampaignConversionSurfaceCount
            Public Overridable Property Key As String
            Public Overridable Property People As Integer
            Public Overridable Property Count As Integer
            Public Overridable Property Amount As Decimal
        End Class
    End Namespace
End Namespace

VB.NET CampaignConversionRunRequest DTOs

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

HTTP + XML

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

POST /CampaignConversions/Run HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CampaignConversionRunRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <CampaignId>0</CampaignId>
  <IncludeFood>false</IncludeFood>
  <People>
    <CampaignConversionPerson>
      <Channel>String</Channel>
      <Email>String</Email>
      <Phone>String</Phone>
      <RecipientId>0</RecipientId>
      <SentAt>0001-01-01T00:00:00</SentAt>
    </CampaignConversionPerson>
  </People>
  <TargetEventId>0</TargetEventId>
  <WindowHours>0</WindowHours>
</CampaignConversionRunRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CampaignConversionResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <ByChannel>
    <CampaignConversionSurfaceCount>
      <Amount>0</Amount>
      <Count>0</Count>
      <Key>String</Key>
      <People>0</People>
    </CampaignConversionSurfaceCount>
  </ByChannel>
  <BySurface>
    <CampaignConversionSurfaceCount>
      <Amount>0</Amount>
      <Count>0</Count>
      <Key>String</Key>
      <People>0</People>
    </CampaignConversionSurfaceCount>
  </BySurface>
  <HeadlineAmount>0</HeadlineAmount>
  <HeadlineConversions>0</HeadlineConversions>
  <MedianHoursToConvert>0</MedianHoursToConvert>
  <Message>String</Message>
  <Notes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Notes>
  <PeopleConverted>0</PeopleConverted>
  <PeopleMeasured>0</PeopleMeasured>
  <RunId>String</RunId>
  <StatusCode>0</StatusCode>
  <TotalAmount>0</TotalAmount>
</CampaignConversionResult>