TicketUserServices

<back to all web services

OutboundEnqueueBatchRequest

Requires Authentication
Required role:Admin
The following routes are available for this service:
POST/Outbound/EnqueueBatch
import Foundation
import ServiceStack

public class OutboundEnqueueBatchRequest : Codable
{
    public var messages:[OutboundEnqueueRequest] = []

    required public init(){}
}

public class OutboundEnqueueRequest : Codable
{
    public var channel:String?
    public var lane:String?
    public var priority:Int?
    public var address:String?
    public var platform:String?
    public var recipientKey:String?
    public var templateKey:String?
    public var language:String?
    public var payloadJson:String?
    public var dedupKey:String?
    public var campaignId:Int?
    public var ownerId:Int?
    public var guardKey:String?
    public var guardSubject:String?
    public var notBefore:Date?
    public var expiresAt:Date?

    required public init(){}
}

public class OutboundEnqueueBatchResult : Codable
{
    public var enqueued:Int?
    public var duplicate:Int?
    public var rejected:Int?
    public var rejections:[OutboundEnqueueBatchRejection] = []
    public var statusCode:Int?
    public var message:String?

    required public init(){}
}

public class OutboundEnqueueBatchRejection : Codable
{
    public var index:Int?
    public var dedupKey:String?
    public var reason:String?

    required public init(){}
}


Swift 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
}