TicketUserServices

<back to all web services

OutboundCampaignCreateRequest

Requires Authentication
Required role:Admin
The following routes are available for this service:
POST/Outbound/Campaigns
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class OutboundCampaignCreateRequest
    {
        public Integer ownerId = null;
        public String name = null;
        public String lane = null;
        public String templateKey = null;
        public String payloadJson = null;
        public String channelOrder = null;
        public Integer holdoutPercent = null;
        public String guardKey = null;
        public String guardSubject = null;
        public Date sendAt = null;
        public Date expiresAt = null;
        public String audienceSource = null;
        public ArrayList<OutboundCampaignPerson> people = null;
        
        public Integer getOwnerId() { return ownerId; }
        public OutboundCampaignCreateRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
        public String getName() { return name; }
        public OutboundCampaignCreateRequest setName(String value) { this.name = value; return this; }
        public String getLane() { return lane; }
        public OutboundCampaignCreateRequest setLane(String value) { this.lane = value; return this; }
        public String getTemplateKey() { return templateKey; }
        public OutboundCampaignCreateRequest setTemplateKey(String value) { this.templateKey = value; return this; }
        public String getPayloadJson() { return payloadJson; }
        public OutboundCampaignCreateRequest setPayloadJson(String value) { this.payloadJson = value; return this; }
        public String getChannelOrder() { return channelOrder; }
        public OutboundCampaignCreateRequest setChannelOrder(String value) { this.channelOrder = value; return this; }
        public Integer getHoldoutPercent() { return holdoutPercent; }
        public OutboundCampaignCreateRequest setHoldoutPercent(Integer value) { this.holdoutPercent = value; return this; }
        public String getGuardKey() { return guardKey; }
        public OutboundCampaignCreateRequest setGuardKey(String value) { this.guardKey = value; return this; }
        public String getGuardSubject() { return guardSubject; }
        public OutboundCampaignCreateRequest setGuardSubject(String value) { this.guardSubject = value; return this; }
        public Date getSendAt() { return sendAt; }
        public OutboundCampaignCreateRequest setSendAt(Date value) { this.sendAt = value; return this; }
        public Date getExpiresAt() { return expiresAt; }
        public OutboundCampaignCreateRequest setExpiresAt(Date value) { this.expiresAt = value; return this; }
        public String getAudienceSource() { return audienceSource; }
        public OutboundCampaignCreateRequest setAudienceSource(String value) { this.audienceSource = value; return this; }
        public ArrayList<OutboundCampaignPerson> getPeople() { return people; }
        public OutboundCampaignCreateRequest setPeople(ArrayList<OutboundCampaignPerson> value) { this.people = value; return this; }
    }

    public static class OutboundCampaignPerson
    {
        public String phone = null;
        public String email = null;
        public ArrayList<OutboundCampaignDevice> devices = null;
        public Boolean pushConsent = null;
        public Boolean smsConsent = null;
        public Boolean emailConsent = null;
        public String payloadJson = null;
        
        public String getPhone() { return phone; }
        public OutboundCampaignPerson setPhone(String value) { this.phone = value; return this; }
        public String getEmail() { return email; }
        public OutboundCampaignPerson setEmail(String value) { this.email = value; return this; }
        public ArrayList<OutboundCampaignDevice> getDevices() { return devices; }
        public OutboundCampaignPerson setDevices(ArrayList<OutboundCampaignDevice> value) { this.devices = value; return this; }
        public Boolean isPushConsent() { return pushConsent; }
        public OutboundCampaignPerson setPushConsent(Boolean value) { this.pushConsent = value; return this; }
        public Boolean isSmsConsent() { return smsConsent; }
        public OutboundCampaignPerson setSmsConsent(Boolean value) { this.smsConsent = value; return this; }
        public Boolean isEmailConsent() { return emailConsent; }
        public OutboundCampaignPerson setEmailConsent(Boolean value) { this.emailConsent = value; return this; }
        public String getPayloadJson() { return payloadJson; }
        public OutboundCampaignPerson setPayloadJson(String value) { this.payloadJson = value; return this; }
    }

    public static class OutboundCampaignDevice
    {
        public String token = null;
        public String platform = null;
        
        public String getToken() { return token; }
        public OutboundCampaignDevice setToken(String value) { this.token = value; return this; }
        public String getPlatform() { return platform; }
        public OutboundCampaignDevice setPlatform(String value) { this.platform = value; return this; }
    }

    public static class OutboundCampaignResult
    {
        public Integer campaignId = null;
        public HashMap<String,Integer> decisions = null;
        public HashMap<String,Integer> queuedByChannel = null;
        public HashMap<String,Integer> messageStatuses = null;
        public Integer duplicates = null;
        public Integer noIdentity = null;
        public Integer statusCode = null;
        public String message = null;
        
        public Integer getCampaignId() { return campaignId; }
        public OutboundCampaignResult setCampaignId(Integer value) { this.campaignId = value; return this; }
        public HashMap<String,Integer> getDecisions() { return decisions; }
        public OutboundCampaignResult setDecisions(HashMap<String,Integer> value) { this.decisions = value; return this; }
        public HashMap<String,Integer> getQueuedByChannel() { return queuedByChannel; }
        public OutboundCampaignResult setQueuedByChannel(HashMap<String,Integer> value) { this.queuedByChannel = value; return this; }
        public HashMap<String,Integer> getMessageStatuses() { return messageStatuses; }
        public OutboundCampaignResult setMessageStatuses(HashMap<String,Integer> value) { this.messageStatuses = value; return this; }
        public Integer getDuplicates() { return duplicates; }
        public OutboundCampaignResult setDuplicates(Integer value) { this.duplicates = value; return this; }
        public Integer getNoIdentity() { return noIdentity; }
        public OutboundCampaignResult setNoIdentity(Integer value) { this.noIdentity = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public OutboundCampaignResult setStatusCode(Integer value) { this.statusCode = value; return this; }
        public String getMessage() { return message; }
        public OutboundCampaignResult setMessage(String value) { this.message = value; return this; }
    }

}

Java OutboundCampaignCreateRequest DTOs

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

HTTP + CSV

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

POST /Outbound/Campaigns HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ownerId":0,"name":"String","lane":"String","templateKey":"String","payloadJson":"String","channelOrder":"String","holdoutPercent":0,"guardKey":"String","guardSubject":"String","sendAt":"0001-01-01T00:00:00.0000000","expiresAt":"0001-01-01T00:00:00.0000000","audienceSource":"String","people":[{"phone":"String","email":"String","devices":[{"token":"String","platform":"String"}],"pushConsent":false,"smsConsent":false,"emailConsent":false,"payloadJson":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"campaignId":0,"decisions":{"String":0},"queuedByChannel":{"String":0},"messageStatuses":{"String":0},"duplicates":0,"noIdentity":0,"statusCode":0,"message":"String"}