TicketUserServices

<back to all web services

OutboundEnqueueBatchRequest

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

public class dtos
{

    public static class OutboundEnqueueBatchRequest
    {
        public ArrayList<OutboundEnqueueRequest> messages = null;
        
        public ArrayList<OutboundEnqueueRequest> getMessages() { return messages; }
        public OutboundEnqueueBatchRequest setMessages(ArrayList<OutboundEnqueueRequest> value) { this.messages = value; return this; }
    }

    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 OutboundEnqueueBatchResult
    {
        public Integer enqueued = null;
        public Integer duplicate = null;
        public Integer rejected = null;
        public ArrayList<OutboundEnqueueBatchRejection> rejections = null;
        public Integer statusCode = null;
        public String message = null;
        
        public Integer getEnqueued() { return enqueued; }
        public OutboundEnqueueBatchResult setEnqueued(Integer value) { this.enqueued = value; return this; }
        public Integer getDuplicate() { return duplicate; }
        public OutboundEnqueueBatchResult setDuplicate(Integer value) { this.duplicate = value; return this; }
        public Integer getRejected() { return rejected; }
        public OutboundEnqueueBatchResult setRejected(Integer value) { this.rejected = value; return this; }
        public ArrayList<OutboundEnqueueBatchRejection> getRejections() { return rejections; }
        public OutboundEnqueueBatchResult setRejections(ArrayList<OutboundEnqueueBatchRejection> value) { this.rejections = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public OutboundEnqueueBatchResult setStatusCode(Integer value) { this.statusCode = value; return this; }
        public String getMessage() { return message; }
        public OutboundEnqueueBatchResult setMessage(String value) { this.message = value; return this; }
    }

    public static class OutboundEnqueueBatchRejection
    {
        public Integer index = null;
        public String dedupKey = null;
        public String reason = null;
        
        public Integer getIndex() { return index; }
        public OutboundEnqueueBatchRejection setIndex(Integer value) { this.index = value; return this; }
        public String getDedupKey() { return dedupKey; }
        public OutboundEnqueueBatchRejection setDedupKey(String value) { this.dedupKey = value; return this; }
        public String getReason() { return reason; }
        public OutboundEnqueueBatchRejection setReason(String value) { this.reason = value; return this; }
    }

}

Java OutboundEnqueueBatchRequest DTOs

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

HTTP + JSV

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

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

{
	messages: 
	[
		{
			channel: String,
			lane: String,
			priority: 0,
			address: String,
			platform: String,
			recipientKey: String,
			templateKey: String,
			language: String,
			payloadJson: String,
			dedupKey: String,
			campaignId: 0,
			ownerId: 0,
			guardKey: String,
			guardSubject: String,
			notBefore: 0001-01-01,
			expiresAt: 0001-01-01
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	enqueued: 0,
	duplicate: 0,
	rejected: 0,
	rejections: 
	[
		{
			index: 0,
			dedupKey: String,
			reason: String
		}
	],
	statusCode: 0,
	message: String
}