| Required role: | Admin |
| POST | /Outbound/Enqueue |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OutboundEnqueueResult:
status: Optional[str] = None
message_id: Optional[int] = None
reason: Optional[str] = None
status_code: Optional[int] = None
message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OutboundEnqueueRequest:
channel: Optional[str] = None
lane: Optional[str] = None
priority: Optional[int] = None
address: Optional[str] = None
platform: Optional[str] = None
recipient_key: Optional[str] = None
template_key: Optional[str] = None
language: Optional[str] = None
payload_json: Optional[str] = None
dedup_key: Optional[str] = None
campaign_id: Optional[int] = None
owner_id: Optional[int] = None
guard_key: Optional[str] = None
guard_subject: Optional[str] = None
not_before: Optional[datetime.datetime] = None
expires_at: Optional[datetime.datetime] = None
Python 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>