POST example/api/transactionmail/sendtemplatebatch

https://app.bwz.se/bedrock/example/api/transactionmail/sendtemplatebatch

Sends (or schedules) a batch of TransactionMailMessage based on a MailTemplate. Max 100 TransactionMailMessages per batch.

Request Information

URI Parameters

None.

Body Parameters

Attachments that will be attached to all TransactionMails in the batch.

SendTransactionMailTemplateBatchArgs
NameDescriptionTypeAdditional information
SendTransactionMailTemplateArgs

Batch of TransactionMails to send. Max limit of 100 TransactionMailss per batch.

Collection of SendTransactionMailTemplateArgs

None.

BatchAttachments

Attachments that will be attached to all TransactionMails in the batch.

Collection of AttachmentModel

None.

Request Formats

application/json, text/json

Sample:
{
  "SendTransactionMailTemplateArgs": [
    {
      "TemplateId": 1,
      "RecipientName": "sample string 2",
      "RecipientEmail": "sample string 3",
      "SenderName": "sample string 4",
      "SenderEmail": "sample string 5",
      "FromName": "sample string 6",
      "FromEmail": "sample string 7",
      "ReplyTo": "sample string 8",
      "Subject": "sample string 9",
      "ScheduledSendDate": "2024-11-21T17:46:18.9637016+01:00",
      "ExternalId": "sample string 10",
      "TransactionMailGroupId": 1,
      "Attachments": [
        {
          "FileData": "QEA=",
          "FileNameWithExtension": "sample string 1",
          "MimeType": "sample string 2"
        },
        {
          "FileData": "QEA=",
          "FileNameWithExtension": "sample string 1",
          "MimeType": "sample string 2"
        }
      ],
      "TrackOpenings": true,
      "ExcludePublicationOptouts": true,
      "ExcludeTotaloptouts": true,
      "ExcludePreviousBounce": true,
      "TrackLinkClicks": true,
      "LinkBaseUrl": "sample string 16",
      "HtmlContentTagModels": [
        {
          "Name": "sample string 1",
          "Value": {}
        },
        {
          "Name": "sample string 1",
          "Value": {}
        }
      ],
      "TextContentTagModels": [
        {
          "Name": "sample string 1",
          "Value": {}
        },
        {
          "Name": "sample string 1",
          "Value": {}
        }
      ],
      "Headers": {
        "sample string 1": "sample string 2",
        "sample string 3": "sample string 4"
      },
      "IncludeEmailDataInWebhookPayload": true
    },
    {
      "TemplateId": 1,
      "RecipientName": "sample string 2",
      "RecipientEmail": "sample string 3",
      "SenderName": "sample string 4",
      "SenderEmail": "sample string 5",
      "FromName": "sample string 6",
      "FromEmail": "sample string 7",
      "ReplyTo": "sample string 8",
      "Subject": "sample string 9",
      "ScheduledSendDate": "2024-11-21T17:46:18.9637016+01:00",
      "ExternalId": "sample string 10",
      "TransactionMailGroupId": 1,
      "Attachments": [
        {
          "FileData": "QEA=",
          "FileNameWithExtension": "sample string 1",
          "MimeType": "sample string 2"
        },
        {
          "FileData": "QEA=",
          "FileNameWithExtension": "sample string 1",
          "MimeType": "sample string 2"
        }
      ],
      "TrackOpenings": true,
      "ExcludePublicationOptouts": true,
      "ExcludeTotaloptouts": true,
      "ExcludePreviousBounce": true,
      "TrackLinkClicks": true,
      "LinkBaseUrl": "sample string 16",
      "HtmlContentTagModels": [
        {
          "Name": "sample string 1",
          "Value": {}
        },
        {
          "Name": "sample string 1",
          "Value": {}
        }
      ],
      "TextContentTagModels": [
        {
          "Name": "sample string 1",
          "Value": {}
        },
        {
          "Name": "sample string 1",
          "Value": {}
        }
      ],
      "Headers": {
        "sample string 1": "sample string 2",
        "sample string 3": "sample string 4"
      },
      "IncludeEmailDataInWebhookPayload": true
    }
  ],
  "BatchAttachments": [
    {
      "FileData": "QEA=",
      "FileNameWithExtension": "sample string 1",
      "MimeType": "sample string 2"
    },
    {
      "FileData": "QEA=",
      "FileNameWithExtension": "sample string 1",
      "MimeType": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<SendTransactionMailTemplateBatchArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.TransactionMail">
  <BatchAttachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models">
    <d2p1:AttachmentModel>
      <d2p1:FileData>QEA=</d2p1:FileData>
      <d2p1:FileNameWithExtension>sample string 1</d2p1:FileNameWithExtension>
      <d2p1:MimeType>sample string 2</d2p1:MimeType>
    </d2p1:AttachmentModel>
    <d2p1:AttachmentModel>
      <d2p1:FileData>QEA=</d2p1:FileData>
      <d2p1:FileNameWithExtension>sample string 1</d2p1:FileNameWithExtension>
      <d2p1:MimeType>sample string 2</d2p1:MimeType>
    </d2p1:AttachmentModel>
  </BatchAttachments>
  <SendTransactionMailTemplateArgs>
    <SendTransactionMailTemplateArgs>
      <Attachments xmlns:d4p1="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models">
        <d4p1:AttachmentModel>
          <d4p1:FileData>QEA=</d4p1:FileData>
          <d4p1:FileNameWithExtension>sample string 1</d4p1:FileNameWithExtension>
          <d4p1:MimeType>sample string 2</d4p1:MimeType>
        </d4p1:AttachmentModel>
        <d4p1:AttachmentModel>
          <d4p1:FileData>QEA=</d4p1:FileData>
          <d4p1:FileNameWithExtension>sample string 1</d4p1:FileNameWithExtension>
          <d4p1:MimeType>sample string 2</d4p1:MimeType>
        </d4p1:AttachmentModel>
      </Attachments>
      <ExcludePreviousBounce>true</ExcludePreviousBounce>
      <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
      <ExcludeTotaloptouts>true</ExcludeTotaloptouts>
      <ExternalId>sample string 10</ExternalId>
      <FromEmail>sample string 7</FromEmail>
      <FromName>sample string 6</FromName>
      <Headers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value>sample string 2</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value>sample string 4</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Headers>
      <HtmlContentTagModels>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
      </HtmlContentTagModels>
      <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
      <LinkBaseUrl>sample string 16</LinkBaseUrl>
      <RecipientEmail>sample string 3</RecipientEmail>
      <RecipientName>sample string 2</RecipientName>
      <ReplyTo>sample string 8</ReplyTo>
      <ScheduledSendDate>2024-11-21T17:46:18.9637016+01:00</ScheduledSendDate>
      <SenderEmail>sample string 5</SenderEmail>
      <SenderName>sample string 4</SenderName>
      <Subject>sample string 9</Subject>
      <TextContentTagModels>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
      </TextContentTagModels>
      <TrackLinkClicks>true</TrackLinkClicks>
      <TrackOpenings>true</TrackOpenings>
      <TransactionMailGroupId>1</TransactionMailGroupId>
      <TemplateId>1</TemplateId>
    </SendTransactionMailTemplateArgs>
    <SendTransactionMailTemplateArgs>
      <Attachments xmlns:d4p1="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models">
        <d4p1:AttachmentModel>
          <d4p1:FileData>QEA=</d4p1:FileData>
          <d4p1:FileNameWithExtension>sample string 1</d4p1:FileNameWithExtension>
          <d4p1:MimeType>sample string 2</d4p1:MimeType>
        </d4p1:AttachmentModel>
        <d4p1:AttachmentModel>
          <d4p1:FileData>QEA=</d4p1:FileData>
          <d4p1:FileNameWithExtension>sample string 1</d4p1:FileNameWithExtension>
          <d4p1:MimeType>sample string 2</d4p1:MimeType>
        </d4p1:AttachmentModel>
      </Attachments>
      <ExcludePreviousBounce>true</ExcludePreviousBounce>
      <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
      <ExcludeTotaloptouts>true</ExcludeTotaloptouts>
      <ExternalId>sample string 10</ExternalId>
      <FromEmail>sample string 7</FromEmail>
      <FromName>sample string 6</FromName>
      <Headers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value>sample string 2</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value>sample string 4</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Headers>
      <HtmlContentTagModels>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
      </HtmlContentTagModels>
      <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
      <LinkBaseUrl>sample string 16</LinkBaseUrl>
      <RecipientEmail>sample string 3</RecipientEmail>
      <RecipientName>sample string 2</RecipientName>
      <ReplyTo>sample string 8</ReplyTo>
      <ScheduledSendDate>2024-11-21T17:46:18.9637016+01:00</ScheduledSendDate>
      <SenderEmail>sample string 5</SenderEmail>
      <SenderName>sample string 4</SenderName>
      <Subject>sample string 9</Subject>
      <TextContentTagModels>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
        <TagModel>
          <Name>sample string 1</Name>
          <Value>System.Object</Value>
        </TagModel>
      </TextContentTagModels>
      <TrackLinkClicks>true</TrackLinkClicks>
      <TrackOpenings>true</TrackOpenings>
      <TransactionMailGroupId>1</TransactionMailGroupId>
      <TemplateId>1</TemplateId>
    </SendTransactionMailTemplateArgs>
  </SendTransactionMailTemplateArgs>
</SendTransactionMailTemplateBatchArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

A BatchTransactionMailModel containing sent and not sent TransactionMails.

BatchTransactionMailModel
NameDescriptionTypeAdditional information
SentTransactionMailModels

Gets or sets the sent transaction mail models.

Collection of TransactionMailModel

None.

NotSentTransactionMailModels

Gets or sets the not sent transaction mail models.

Collection of NotSentTransactionMailModel

None.

Response Formats

application/json, text/json

Sample:
{
  "SentTransactionMailModels": [
    {
      "TransactionMailId": 1,
      "RecipientName": "sample string 2",
      "RecipientEmail": "sample string 3",
      "SenderName": "sample string 4",
      "SenderEmail": "sample string 5",
      "FromName": "sample string 6",
      "FromEmail": "sample string 7",
      "ReplyTo": "sample string 8",
      "Subject": "sample string 9",
      "TrackOpenings": true,
      "TrackLinkClicks": true,
      "LinkBaseUrl": "sample string 12",
      "ExternalId": "sample string 13",
      "ExcludeTotalOptouts": true,
      "ExcludePublicationOptouts": true,
      "ExcludePreviousBounce": true,
      "IsInternalMail": true,
      "CreationDate": "2024-11-21T17:46:18.9637016+01:00",
      "IncludeEmailDataInWebhookPayload": true
    },
    {
      "TransactionMailId": 1,
      "RecipientName": "sample string 2",
      "RecipientEmail": "sample string 3",
      "SenderName": "sample string 4",
      "SenderEmail": "sample string 5",
      "FromName": "sample string 6",
      "FromEmail": "sample string 7",
      "ReplyTo": "sample string 8",
      "Subject": "sample string 9",
      "TrackOpenings": true,
      "TrackLinkClicks": true,
      "LinkBaseUrl": "sample string 12",
      "ExternalId": "sample string 13",
      "ExcludeTotalOptouts": true,
      "ExcludePublicationOptouts": true,
      "ExcludePreviousBounce": true,
      "IsInternalMail": true,
      "CreationDate": "2024-11-21T17:46:18.9637016+01:00",
      "IncludeEmailDataInWebhookPayload": true
    }
  ],
  "NotSentTransactionMailModels": [
    {
      "TransactionMailModel": {
        "TransactionMailId": 1,
        "RecipientName": "sample string 2",
        "RecipientEmail": "sample string 3",
        "SenderName": "sample string 4",
        "SenderEmail": "sample string 5",
        "FromName": "sample string 6",
        "FromEmail": "sample string 7",
        "ReplyTo": "sample string 8",
        "Subject": "sample string 9",
        "TrackOpenings": true,
        "TrackLinkClicks": true,
        "LinkBaseUrl": "sample string 12",
        "ExternalId": "sample string 13",
        "ExcludeTotalOptouts": true,
        "ExcludePublicationOptouts": true,
        "ExcludePreviousBounce": true,
        "IsInternalMail": true,
        "CreationDate": "2024-11-21T17:46:18.9637016+01:00",
        "IncludeEmailDataInWebhookPayload": true
      },
      "ErrorMessage": "sample string 1",
      "Status": 0
    },
    {
      "TransactionMailModel": {
        "TransactionMailId": 1,
        "RecipientName": "sample string 2",
        "RecipientEmail": "sample string 3",
        "SenderName": "sample string 4",
        "SenderEmail": "sample string 5",
        "FromName": "sample string 6",
        "FromEmail": "sample string 7",
        "ReplyTo": "sample string 8",
        "Subject": "sample string 9",
        "TrackOpenings": true,
        "TrackLinkClicks": true,
        "LinkBaseUrl": "sample string 12",
        "ExternalId": "sample string 13",
        "ExcludeTotalOptouts": true,
        "ExcludePublicationOptouts": true,
        "ExcludePreviousBounce": true,
        "IsInternalMail": true,
        "CreationDate": "2024-11-21T17:46:18.9637016+01:00",
        "IncludeEmailDataInWebhookPayload": true
      },
      "ErrorMessage": "sample string 1",
      "Status": 0
    }
  ]
}

application/xml, text/xml

Sample:
<BatchTransactionMailModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.TransactionMail">
  <NotSentTransactionMailModels>
    <NotSentTransactionMailModel>
      <ErrorMessage>sample string 1</ErrorMessage>
      <Status>UNPROCESSED</Status>
      <TransactionMailModel>
        <CreationDate>2024-11-21T17:46:18.9637016+01:00</CreationDate>
        <ExcludePreviousBounce>true</ExcludePreviousBounce>
        <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
        <ExcludeTotalOptouts>true</ExcludeTotalOptouts>
        <ExternalId>sample string 13</ExternalId>
        <FromEmail>sample string 7</FromEmail>
        <FromName>sample string 6</FromName>
        <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
        <IsInternalMail>true</IsInternalMail>
        <LinkBaseUrl>sample string 12</LinkBaseUrl>
        <RecipientEmail>sample string 3</RecipientEmail>
        <RecipientName>sample string 2</RecipientName>
        <ReplyTo>sample string 8</ReplyTo>
        <SenderEmail>sample string 5</SenderEmail>
        <SenderName>sample string 4</SenderName>
        <Subject>sample string 9</Subject>
        <TrackLinkClicks>true</TrackLinkClicks>
        <TrackOpenings>true</TrackOpenings>
        <TransactionMailId>1</TransactionMailId>
      </TransactionMailModel>
    </NotSentTransactionMailModel>
    <NotSentTransactionMailModel>
      <ErrorMessage>sample string 1</ErrorMessage>
      <Status>UNPROCESSED</Status>
      <TransactionMailModel>
        <CreationDate>2024-11-21T17:46:18.9637016+01:00</CreationDate>
        <ExcludePreviousBounce>true</ExcludePreviousBounce>
        <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
        <ExcludeTotalOptouts>true</ExcludeTotalOptouts>
        <ExternalId>sample string 13</ExternalId>
        <FromEmail>sample string 7</FromEmail>
        <FromName>sample string 6</FromName>
        <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
        <IsInternalMail>true</IsInternalMail>
        <LinkBaseUrl>sample string 12</LinkBaseUrl>
        <RecipientEmail>sample string 3</RecipientEmail>
        <RecipientName>sample string 2</RecipientName>
        <ReplyTo>sample string 8</ReplyTo>
        <SenderEmail>sample string 5</SenderEmail>
        <SenderName>sample string 4</SenderName>
        <Subject>sample string 9</Subject>
        <TrackLinkClicks>true</TrackLinkClicks>
        <TrackOpenings>true</TrackOpenings>
        <TransactionMailId>1</TransactionMailId>
      </TransactionMailModel>
    </NotSentTransactionMailModel>
  </NotSentTransactionMailModels>
  <SentTransactionMailModels>
    <TransactionMailModel>
      <CreationDate>2024-11-21T17:46:18.9637016+01:00</CreationDate>
      <ExcludePreviousBounce>true</ExcludePreviousBounce>
      <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
      <ExcludeTotalOptouts>true</ExcludeTotalOptouts>
      <ExternalId>sample string 13</ExternalId>
      <FromEmail>sample string 7</FromEmail>
      <FromName>sample string 6</FromName>
      <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
      <IsInternalMail>true</IsInternalMail>
      <LinkBaseUrl>sample string 12</LinkBaseUrl>
      <RecipientEmail>sample string 3</RecipientEmail>
      <RecipientName>sample string 2</RecipientName>
      <ReplyTo>sample string 8</ReplyTo>
      <SenderEmail>sample string 5</SenderEmail>
      <SenderName>sample string 4</SenderName>
      <Subject>sample string 9</Subject>
      <TrackLinkClicks>true</TrackLinkClicks>
      <TrackOpenings>true</TrackOpenings>
      <TransactionMailId>1</TransactionMailId>
    </TransactionMailModel>
    <TransactionMailModel>
      <CreationDate>2024-11-21T17:46:18.9637016+01:00</CreationDate>
      <ExcludePreviousBounce>true</ExcludePreviousBounce>
      <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
      <ExcludeTotalOptouts>true</ExcludeTotalOptouts>
      <ExternalId>sample string 13</ExternalId>
      <FromEmail>sample string 7</FromEmail>
      <FromName>sample string 6</FromName>
      <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
      <IsInternalMail>true</IsInternalMail>
      <LinkBaseUrl>sample string 12</LinkBaseUrl>
      <RecipientEmail>sample string 3</RecipientEmail>
      <RecipientName>sample string 2</RecipientName>
      <ReplyTo>sample string 8</ReplyTo>
      <SenderEmail>sample string 5</SenderEmail>
      <SenderName>sample string 4</SenderName>
      <Subject>sample string 9</Subject>
      <TrackLinkClicks>true</TrackLinkClicks>
      <TrackOpenings>true</TrackOpenings>
      <TransactionMailId>1</TransactionMailId>
    </TransactionMailModel>
  </SentTransactionMailModels>
</BatchTransactionMailModel>