POST example/api/publication/optin/email

https://app.bwz.se/bedrock/example/api/publication/optin/email

Creates Publication opt-ins for each MailRecipient found or created from the supplied email addresses.

Request Information

URI Parameters

None.

Body Parameters

Should an email be sent to the admin and the new subscriber when someone does an optin?

CreateMailPublicationEmailOptInArgs
NameDescriptionTypeAdditional information
PublicationId

ID of the Publication the MailRecipient will opt-in to.

integer

None.

Email

Email address of a MailRecipient. If no MailRecipient with that email address exists, a new will be created.

string

Required

Valid email adress

SendMails

Should an email be sent to the admin and the new subscriber when someone does an optin?

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "PublicationId": 1,
  "Email": "sample string 2",
  "SendMails": true
}

application/xml, text/xml

Sample:
<CreateMailPublicationEmailOptInArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailPublicationOptIn">
  <Email>sample string 2</Email>
  <PublicationId>1</PublicationId>
  <SendMails>true</SendMails>
</CreateMailPublicationEmailOptInArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

An array of MailPublicationOptInModels that has been created.

Collection of MailPublicationOptInModel
NameDescriptionTypeAdditional information
MailRecipientId

Gets or sets the ID of the opt-in MailRecipient.

integer

None.

OptInDate

Gets or sets the opt-in date and time.

date

None.

PublicationId

Gets or sets the ID of the opt-in Publication.

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "MailRecipientId": 1,
    "OptInDate": "2024-12-23T06:43:08.6660909+01:00",
    "PublicationId": 3
  },
  {
    "MailRecipientId": 1,
    "OptInDate": "2024-12-23T06:43:08.6660909+01:00",
    "PublicationId": 3
  }
]

application/xml, text/xml

Sample:
<ArrayOfMailPublicationOptInModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailPublicationOptIn">
  <MailPublicationOptInModel>
    <MailRecipientId>1</MailRecipientId>
    <OptInDate>2024-12-23T06:43:08.6660909+01:00</OptInDate>
    <PublicationId>3</PublicationId>
  </MailPublicationOptInModel>
  <MailPublicationOptInModel>
    <MailRecipientId>1</MailRecipientId>
    <OptInDate>2024-12-23T06:43:08.6660909+01:00</OptInDate>
    <PublicationId>3</PublicationId>
  </MailPublicationOptInModel>
</ArrayOfMailPublicationOptInModel>