| POST | /CampaignConversions/Run |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CampaignConversionRunRequest
{
var campaignId:Int? = null
var people:ArrayList<CampaignConversionPerson> = ArrayList<CampaignConversionPerson>()
var windowHours:Int? = null
var targetEventId:Int? = null
var includeFood:Boolean? = null
}
open class CampaignConversionPerson
{
var phone:String? = null
var email:String? = null
var recipientId:Int? = null
var channel:String? = null
var sentAt:Date? = null
}
open class CampaignConversionResult
{
var runId:String? = null
var peopleMeasured:Int? = null
var peopleConverted:Int? = null
var totalAmount:BigDecimal? = null
var bySurface:ArrayList<CampaignConversionSurfaceCount> = ArrayList<CampaignConversionSurfaceCount>()
var byChannel:ArrayList<CampaignConversionSurfaceCount> = ArrayList<CampaignConversionSurfaceCount>()
var headlineConversions:Int? = null
var headlineAmount:BigDecimal? = null
var medianHoursToConvert:Int? = null
var notes:ArrayList<String> = ArrayList<String>()
var statusCode:Int? = null
var message:String? = null
}
open class CampaignConversionSurfaceCount
{
var key:String? = null
var people:Int? = null
var count:Int? = null
var amount:BigDecimal? = null
}
Kotlin CampaignConversionRunRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
campaignId: 0,
people:
[
{
phone: String,
email: String,
recipientId: 0,
channel: String,
sentAt: 0001-01-01
}
],
windowHours: 0,
targetEventId: 0,
includeFood: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
runId: String,
peopleMeasured: 0,
peopleConverted: 0,
totalAmount: 0,
bySurface:
[
{
key: String,
people: 0,
count: 0,
amount: 0
}
],
byChannel:
[
{
key: String,
people: 0,
count: 0,
amount: 0
}
],
headlineConversions: 0,
headlineAmount: 0,
medianHoursToConvert: 0,
notes:
[
String
],
statusCode: 0,
message: String
}