| Required role: | Admin |
| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<OutboundEnqueueRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<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>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OutboundEnqueueResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Message>String</Message> <MessageId>0</MessageId> <Reason>String</Reason> <Status>String</Status> <StatusCode>0</StatusCode> </OutboundEnqueueResult>