TicketUserServices

<back to all web services

OutboundEnqueueBatchRequest

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

export class OutboundEnqueueBatchRejection
{
    public index?: number;
    public dedupKey?: string;
    public reason?: string;

    public constructor(init?: Partial<OutboundEnqueueBatchRejection>) { (Object as any).assign(this, init); }
}

export class OutboundEnqueueBatchResult
{
    public enqueued?: number;
    public duplicate?: number;
    public rejected?: number;
    public rejections?: OutboundEnqueueBatchRejection[];
    public statusCode?: number;
    public message?: string;

    public constructor(init?: Partial<OutboundEnqueueBatchResult>) { (Object as any).assign(this, init); }
}

export class OutboundEnqueueRequest
{
    public channel?: string;
    public lane?: string;
    public priority?: number;
    public address?: string;
    public platform?: string;
    public recipientKey?: string;
    public templateKey?: string;
    public language?: string;
    public payloadJson?: string;
    public dedupKey?: string;
    public campaignId?: number;
    public ownerId?: number;
    public guardKey?: string;
    public guardSubject?: string;
    public notBefore?: string;
    public expiresAt?: string;

    public constructor(init?: Partial<OutboundEnqueueRequest>) { (Object as any).assign(this, init); }
}

export class OutboundEnqueueBatchRequest
{
    public messages?: OutboundEnqueueRequest[];

    public constructor(init?: Partial<OutboundEnqueueBatchRequest>) { (Object as any).assign(this, init); }
}

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