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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<OutboundEnqueueBatchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Messages>
    <OutboundEnqueueRequest>
      <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>
  </Messages>
</OutboundEnqueueBatchRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OutboundEnqueueBatchResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Duplicate>0</Duplicate>
  <Enqueued>0</Enqueued>
  <Message>String</Message>
  <Rejected>0</Rejected>
  <Rejections>
    <OutboundEnqueueBatchRejection>
      <DedupKey>String</DedupKey>
      <Index>0</Index>
      <Reason>String</Reason>
    </OutboundEnqueueBatchRejection>
  </Rejections>
  <StatusCode>0</StatusCode>
</OutboundEnqueueBatchResult>