| Required role: | Admin |
| POST | /Outbound/Enqueue |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class OutboundEnqueueRequest
{
public String channel = null;
public String lane = null;
public Integer priority = null;
public String address = null;
public String platform = null;
public String recipientKey = null;
public String templateKey = null;
public String language = null;
public String payloadJson = null;
public String dedupKey = null;
public Integer campaignId = null;
public Integer ownerId = null;
public String guardKey = null;
public String guardSubject = null;
public Date notBefore = null;
public Date expiresAt = null;
public String getChannel() { return channel; }
public OutboundEnqueueRequest setChannel(String value) { this.channel = value; return this; }
public String getLane() { return lane; }
public OutboundEnqueueRequest setLane(String value) { this.lane = value; return this; }
public Integer getPriority() { return priority; }
public OutboundEnqueueRequest setPriority(Integer value) { this.priority = value; return this; }
public String getAddress() { return address; }
public OutboundEnqueueRequest setAddress(String value) { this.address = value; return this; }
public String getPlatform() { return platform; }
public OutboundEnqueueRequest setPlatform(String value) { this.platform = value; return this; }
public String getRecipientKey() { return recipientKey; }
public OutboundEnqueueRequest setRecipientKey(String value) { this.recipientKey = value; return this; }
public String getTemplateKey() { return templateKey; }
public OutboundEnqueueRequest setTemplateKey(String value) { this.templateKey = value; return this; }
public String getLanguage() { return language; }
public OutboundEnqueueRequest setLanguage(String value) { this.language = value; return this; }
public String getPayloadJson() { return payloadJson; }
public OutboundEnqueueRequest setPayloadJson(String value) { this.payloadJson = value; return this; }
public String getDedupKey() { return dedupKey; }
public OutboundEnqueueRequest setDedupKey(String value) { this.dedupKey = value; return this; }
public Integer getCampaignId() { return campaignId; }
public OutboundEnqueueRequest setCampaignId(Integer value) { this.campaignId = value; return this; }
public Integer getOwnerId() { return ownerId; }
public OutboundEnqueueRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
public String getGuardKey() { return guardKey; }
public OutboundEnqueueRequest setGuardKey(String value) { this.guardKey = value; return this; }
public String getGuardSubject() { return guardSubject; }
public OutboundEnqueueRequest setGuardSubject(String value) { this.guardSubject = value; return this; }
public Date getNotBefore() { return notBefore; }
public OutboundEnqueueRequest setNotBefore(Date value) { this.notBefore = value; return this; }
public Date getExpiresAt() { return expiresAt; }
public OutboundEnqueueRequest setExpiresAt(Date value) { this.expiresAt = value; return this; }
}
public static class OutboundEnqueueResult
{
public String status = null;
public Long messageId = null;
public String reason = null;
public Integer statusCode = null;
public String message = null;
public String getStatus() { return status; }
public OutboundEnqueueResult setStatus(String value) { this.status = value; return this; }
public Long getMessageId() { return messageId; }
public OutboundEnqueueResult setMessageId(Long value) { this.messageId = value; return this; }
public String getReason() { return reason; }
public OutboundEnqueueResult setReason(String value) { this.reason = value; return this; }
public Integer getStatusCode() { return statusCode; }
public OutboundEnqueueResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public OutboundEnqueueResult setMessage(String value) { this.message = value; return this; }
}
}
Java OutboundEnqueueRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Outbound/Enqueue HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OutboundEnqueueRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Address>String</Address>
<CampaignId>0</CampaignId>
<Channel>String</Channel>
<DedupKey>String</DedupKey>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<GuardKey>String</GuardKey>
<GuardSubject>String</GuardSubject>
<Lane>String</Lane>
<Language>String</Language>
<NotBefore>0001-01-01T00:00:00</NotBefore>
<OwnerId>0</OwnerId>
<PayloadJson>String</PayloadJson>
<Platform>String</Platform>
<Priority>0</Priority>
<RecipientKey>String</RecipientKey>
<TemplateKey>String</TemplateKey>
</OutboundEnqueueRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OutboundEnqueueResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Message>String</Message> <MessageId>0</MessageId> <Reason>String</Reason> <Status>String</Status> <StatusCode>0</StatusCode> </OutboundEnqueueResult>