POST example/api/mailmessage/{id}/connectexternalobject
https://app.bwz.se/bedrock/example/api/mailmessage/{id}/connectexternalobject
Connects a MailMessage to an external object
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id |
Id of the MailMessage |
integer |
Required |
Body Parameters
Id of the TransactionHandler, only needed if you have more than one TransactionHandler for your site. Otherwise it will be found automatically
ConnectExternalObjectArgsName | Description | Type | Additional information |
---|---|---|---|
ExternalObjectId |
The Id of the External Object that should be connected to the Entity |
string |
Required |
ExternalObjectName |
The name of the External Object |
string |
None. |
TransactionHandlerId |
Id of the TransactionHandler, only needed if you have more than one TransactionHandler for your site. Otherwise it will be found automatically |
integer |
None. |
Request Formats
application/json, text/json
{ "ExternalObjectId": "sample string 1", "ExternalObjectName": "sample string 2", "TransactionHandlerId": 1 }
application/xml, text/xml
<ConnectExternalObjectArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models"> <ExternalObjectId>sample string 1</ExternalObjectId> <ExternalObjectName>sample string 2</ExternalObjectName> <TransactionHandlerId>1</TransactionHandlerId> </ConnectExternalObjectArgs>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
A model conatining the MailMessage and the connected External Object
MailMessageExternalObjectModelName | Description | Type | Additional information |
---|---|---|---|
MailMessageModel |
The MailMessageModel |
MailMessageModel |
None. |
TransactionHandlerId |
The Id of the connected TransactionHandler |
integer |
None. |
ExternalObjectId |
The Id of the connected External Object |
string |
None. |
ExternalObjectName |
The name of the connected External Object |
string |
None. |
Response Formats
application/json, text/json
{ "MailMessageModel": { "Id": 1, "Name": "sample string 2", "CreatedByUserId": 3, "MessageStatus": 0, "CreationDate": "2024-11-21T17:38:26.851637+01:00", "ModifiedDate": "2024-11-21T17:38:26.851637+01:00", "PublicationId": 6, "Description": "sample string 7", "SenderName": "sample string 8", "SenderEmail": "sample string 9", "ReplyTo": "sample string 10", "Subject": "sample string 11", "UseStatistics": true, "HtmlContentId": 1, "TextContentId": 1, "ScheduledSendDate": "2024-11-21T17:38:26.851637+01:00", "MailTemplateId": 1, "Preheader": "sample string 13" }, "TransactionHandlerId": 1, "ExternalObjectId": "sample string 2", "ExternalObjectName": "sample string 3" }
application/xml, text/xml
<MailMessageExternalObjectModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailMessage"> <ExternalObjectId>sample string 2</ExternalObjectId> <ExternalObjectName>sample string 3</ExternalObjectName> <MailMessageModel> <CreatedByUserId>3</CreatedByUserId> <CreationDate>2024-11-21T17:38:26.851637+01:00</CreationDate> <Description>sample string 7</Description> <HtmlContentId>1</HtmlContentId> <Id>1</Id> <MailTemplateId>1</MailTemplateId> <MessageStatus>NotReadyToSend</MessageStatus> <ModifiedDate>2024-11-21T17:38:26.851637+01:00</ModifiedDate> <Name>sample string 2</Name> <Preheader>sample string 13</Preheader> <PublicationId>6</PublicationId> <ReplyTo>sample string 10</ReplyTo> <ScheduledSendDate>2024-11-21T17:38:26.851637+01:00</ScheduledSendDate> <SenderEmail>sample string 9</SenderEmail> <SenderName>sample string 8</SenderName> <Subject>sample string 11</Subject> <TextContentId>1</TextContentId> <UseStatistics>true</UseStatistics> </MailMessageModel> <TransactionHandlerId>1</TransactionHandlerId> </MailMessageExternalObjectModel>