POST example/api/smsrecipient/CreateFromXmlData

https://app.bwz.se/bedrock/example/api/smsrecipient/CreateFromXmlData

Import SmsRecipients.

Request Information

URI Parameters

None.

Body Parameters

Set to true if a SMS recipient is blocked but shall be imported.

CreateSmsRecipientXMLArgs
NameDescriptionTypeAdditional information
Data

The SmsRecipients with properties. Must be XML formatted.

Collection of byte

Required

CreateNewRecipientProperties

A flag to indicate whether recipient properties that can't be found should be created or ignored.

boolean

None.

UpdateExistingRecipients

A flag to indicate whether to update SmsRecipients with properties from the data.

boolean

None.

DestinationItemType

Destination of the imported recipients.

ImportTo

Required

SmsRecipientListId

Id of target SmsRecipientList. Only used when matched with correct ImportTo.

integer

None.

DefaultCountryCode

This value will be used when a mobile number is missing country code

integer

None.

ImportSourceName

Name/source of the recipient data which is display to users and recipients

string

Valid name with max 256 characters

OverrideBlockedRecipients

Set to true if a SMS recipient is blocked but shall be imported.

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Data": "QEA=",
  "CreateNewRecipientProperties": true,
  "UpdateExistingRecipients": true,
  "DestinationItemType": 1,
  "SmsRecipientListId": 1,
  "DefaultCountryCode": 1,
  "ImportSourceName": "sample string 3",
  "OverrideBlockedRecipients": true
}

application/xml, text/xml

Sample:
<CreateSmsRecipientXMLArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.SmsRecipient">
  <CreateNewRecipientProperties>true</CreateNewRecipientProperties>
  <Data>QEA=</Data>
  <DefaultCountryCode>1</DefaultCountryCode>
  <DestinationItemType>EXISTING_LIST</DestinationItemType>
  <ImportSourceName>sample string 3</ImportSourceName>
  <OverrideBlockedRecipients>true</OverrideBlockedRecipients>
  <SmsRecipientListId>1</SmsRecipientListId>
  <UpdateExistingRecipients>true</UpdateExistingRecipients>
</CreateSmsRecipientXMLArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

An ImportResult

ImportResultModel
NameDescriptionTypeAdditional information
ExistingRecipients

Nubmer of MailRecipients that already existed.

integer

None.

NewRecipientsCreated

Number of new MailRecipients created.

integer

None.

RecipientsAddedToList

Number of MailRecipients that was added to list.

integer

None.

RecipientsNotImported

Number of MailRecipients that wasn't imported.

integer

None.

SharedBlockedRecipients

Number of MailRecipients that wasn't imported due to shared block list.

integer

None.

ImportStatus

Status of the import.

BackgroundImportStatus

None.

Response Formats

application/json, text/json

Sample:
{
  "ExistingRecipients": 1,
  "NewRecipientsCreated": 2,
  "RecipientsAddedToList": 3,
  "RecipientsNotImported": 4,
  "SharedBlockedRecipients": 5,
  "ImportStatus": 0
}

application/xml, text/xml

Sample:
<ImportResultModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models">
  <ExistingRecipients>1</ExistingRecipients>
  <ImportStatus>INIT</ImportStatus>
  <NewRecipientsCreated>2</NewRecipientsCreated>
  <RecipientsAddedToList>3</RecipientsAddedToList>
  <RecipientsNotImported>4</RecipientsNotImported>
  <SharedBlockedRecipients>5</SharedBlockedRecipients>
</ImportResultModel>