| Required role: | Admin |
| POST | /Outbound/Campaigns/{CampaignId}/Launch |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class OutboundCampaignLaunchRequest
{
public Integer campaignId = null;
public ArrayList<OutboundCampaignPerson> people = null;
public Integer getCampaignId() { return campaignId; }
public OutboundCampaignLaunchRequest setCampaignId(Integer value) { this.campaignId = value; return this; }
public ArrayList<OutboundCampaignPerson> getPeople() { return people; }
public OutboundCampaignLaunchRequest 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 OutboundCampaignLaunchRequest 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 /Outbound/Campaigns/{CampaignId}/Launch 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,
devices:
[
{
token: String,
platform: String
}
],
pushConsent: False,
smsConsent: False,
emailConsent: False,
payloadJson: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
campaignId: 0,
decisions:
{
String: 0
},
queuedByChannel:
{
String: 0
},
messageStatuses:
{
String: 0
},
duplicates: 0,
noIdentity: 0,
statusCode: 0,
message: String
}