TicketUserServices

<back to all web services

OutboundEnqueueRequest

Requires Authentication
Required role:Admin
The following routes are available for this service:
POST/Outbound/Enqueue
import 'package:servicestack/servicestack.dart';

class OutboundEnqueueResult implements IConvertible
{
    String? status;
    int? messageId;
    String? reason;
    int? statusCode;
    String? message;

    OutboundEnqueueResult({this.status,this.messageId,this.reason,this.statusCode,this.message});
    OutboundEnqueueResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        status = json['status'];
        messageId = json['messageId'];
        reason = json['reason'];
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'status': status,
        'messageId': messageId,
        'reason': reason,
        'statusCode': statusCode,
        'message': message
    };

    getTypeName() => "OutboundEnqueueResult";
    TypeContext? context = _ctx;
}

class OutboundEnqueueRequest implements IConvertible
{
    String? channel;
    String? lane;
    int? priority;
    String? address;
    String? platform;
    String? recipientKey;
    String? templateKey;
    String? language;
    String? payloadJson;
    String? dedupKey;
    int? campaignId;
    int? ownerId;
    String? guardKey;
    String? guardSubject;
    DateTime? notBefore;
    DateTime? expiresAt;

    OutboundEnqueueRequest({this.channel,this.lane,this.priority,this.address,this.platform,this.recipientKey,this.templateKey,this.language,this.payloadJson,this.dedupKey,this.campaignId,this.ownerId,this.guardKey,this.guardSubject,this.notBefore,this.expiresAt});
    OutboundEnqueueRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        channel = json['channel'];
        lane = json['lane'];
        priority = json['priority'];
        address = json['address'];
        platform = json['platform'];
        recipientKey = json['recipientKey'];
        templateKey = json['templateKey'];
        language = json['language'];
        payloadJson = json['payloadJson'];
        dedupKey = json['dedupKey'];
        campaignId = json['campaignId'];
        ownerId = json['ownerId'];
        guardKey = json['guardKey'];
        guardSubject = json['guardSubject'];
        notBefore = JsonConverters.fromJson(json['notBefore'],'DateTime',context!);
        expiresAt = JsonConverters.fromJson(json['expiresAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'channel': channel,
        'lane': lane,
        'priority': priority,
        'address': address,
        'platform': platform,
        'recipientKey': recipientKey,
        'templateKey': templateKey,
        'language': language,
        'payloadJson': payloadJson,
        'dedupKey': dedupKey,
        'campaignId': campaignId,
        'ownerId': ownerId,
        'guardKey': guardKey,
        'guardSubject': guardSubject,
        'notBefore': JsonConverters.toJson(notBefore,'DateTime',context!),
        'expiresAt': JsonConverters.toJson(expiresAt,'DateTime',context!)
    };

    getTypeName() => "OutboundEnqueueRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'OutboundEnqueueResult': TypeInfo(TypeOf.Class, create:() => OutboundEnqueueResult()),
    'OutboundEnqueueRequest': TypeInfo(TypeOf.Class, create:() => OutboundEnqueueRequest()),
});

Dart OutboundEnqueueRequest 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/Enqueue HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	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

{
	status: String,
	messageId: 0,
	reason: String,
	statusCode: 0,
	message: String
}