The following is a description of functions to enable communications delivery and other deliveries.
Batch deliveries
sendNewsletter
It enables a communication delivery according to the options MNSendOptions.
Returns the ID of created delivery.
Parameter | Type | Description |
---|---|---|
idnewsletter | String | |
target | List of String | If MNSendOptions.trial = true the target parameter is the list of addresses to which you send a test message for a preview If MNSendOptions.trial = false the target parameter is the list of contacts audiences ids to which send the communication |
options | MNSendOptions | Available MNSendOptions:
|
advancedOptions | List of <Option> | Available options:
|
Return values: String
Permissions: Send communication for the journey and send communications and send communication to contacts of the database for each audience
getDeliveryStatus
Returns the delivery status.
The delivery has completed the first launch to all contacts when it passes to status MNDeliveryStatus.status = "FINISHING" or "FINISHED".
Delivery is active in the system if MNDeliveryStatus.active=true.
Parameter | Type |
---|---|
idDeliveryStatus | String |
Return values: MNDeliveryStatus
Permissions: Send communication for the journey and send communications
getDeliveryStatusForNewsletter
Returns a status page for each communication's delivery.
Parameter | Type |
---|---|
idNewsletter | String |
options | List of <Option> |
Return values: MNDeliveryStatus
Permissions: Send communication for the journey and send communications
requestDeliveryStatusAction
Requires the modification of a delivery status.
Notes: a delivery change of status might not be immediate. If some messages have been queued for delivery they may still be sent, besides the delivery stop request. The system automatically removes deliveries that are in "pause" for too long.
Parameter | Type | Description |
---|---|---|
idDeliveryStatus | String | |
action | String | values of actions: stop: requires to stop delivery pause: requires to temporarily suspend delivery resume: requires to resume delivery |
Return values: MNDeliveryStatus
Permissions: Send communication for the journey and send communications
getActiveDeliveryStatus
Returns a status page for each active delivery of a journey.
Parameter | Type |
---|---|
idCampaign | String |
Return values: List of MNDeliveryStatus
Permissions: Send communication for the journey and send communications
queryDeliveryStatus
Returns a status page for deliveries of a given journey. The result is a RowSet to be downloaded using fetchDeliveryStatus
Parameter | Type | Description |
---|---|---|
idCampaign | String |
Return values: String
Permissions:
queryDeliveries
Returns a status page for deliveries. The result is a RowSet to be downloaded using fetchDeliveryStatus
Parameter | Type | |
---|---|---|
option | List of <Option> | Available options:
|
trials | Boolean | If true (or not specified), they will be returned the test deliveries too. If false, the test deliveries will be discarded |
Return values: String
Permissions:
fetchDeliveryStatus
Returns a status page for deliveries.
Parameter | Type |
---|---|
idRowSet | String |
fromIndex | int |
toIndex | int |
Return values: List of MNDeliveryStatus
Permissions: Send communication for the journey and send communications
Notification messages
sendEmailMessage
Sends a notification email (transactional message).
Parameter | Type | Description |
---|---|---|
message | EmailMessage | |
option | List of <Option> | Available options:
|
Return values: MNSimpleMessageStatus
Permissions: Send communications and send communications to contacts of the database
sendSmsMessage
Sends a notification SMS text message (transactional).
Parameter | Type | Description |
---|---|---|
message | SmsMessage | |
option | List of <Option> | Available options:
|
Return values: MNSimpleMessageStatus
Permissions: Send communications and send communications to contacts of the database
getSimpleMessageStatus
Returns the delivery status of a notification message.
Parameter | Type |
---|---|
idMessage | String |
Return values: MNSimpleMessageStatus
Permissions: If referred to a database contact, database data export permissions for the specific database.
If not referred to a database contact, database data export permissions for all the databases.
Always the Send communication permissions.
batchGetSimpleMessageStatus
Returns the delivery status for notification messages.
Parameter | Type |
---|---|
idMessages | List of String |
Return values: List of MNSimpleMessageStatus
Permissions: If referred to a database contact, database data export permissions for the specific database.
If not referred to a database contact, database data export permissions for all the databases.
Always the Send communication permissions.
batchCancelSimpleMessages
Stops the delivery of a batch of notification messages.
Parameter | Type |
---|---|
idMessages | List of String |
Return values: List of SendSimpleMessageOperation
Permissions: Send communications
batchSendEmailMessage
Sends multiple email messages.
even if this function allows a more efficient execution of the operation (by reusing data structures and connections on the server side), it is not recommended to request batches of more than 1000 items (please, contact the technical support for any further information or suggestion).
Parameter | Type |
---|---|
message | A list of BatchEmailMessage objects |
Return values: List of BatchEmailMessageOperation
Permissions: Send communications
batchSendSmsMessage
Sends multiple sms messages.
even if this function allows a more efficient execution of the operation (by reusing data structures and connections on the server side), it is not recommended to request batches of more than 1000 items (please, contact the technical support for any further information or suggestion).
Parameter | Type |
---|---|
message | A list of BatchSmsMessage objects |
Return values: List of BatchSmsMessageOperation
Permissions: Send communications
Utility functions
describeBounceCategories
Describes all available bounce categories.
Notes: the list of bounce categories is updated not very frequently (once a month), you should cache this list
Parameter | Type | |
---|---|---|
advancedOptions | List of <Option> | Available options: none for current version |
Return values: List of BounceCategory
Permissions: None (public data)
getAllDeliveryPolicies
Describes all available policies for this account.
Notes: if the policy mapping feature is not active in this account, it will be returned an empty list
Parameter | Type | Description |
---|---|---|
options | List of <Option> | No available options |
Return values: List of MNDeliveryPolicy
Permissions: None (public data)
getAllSimpleMessageCategories
Describes all available transactional message categories for this account.
Parameter | Type | Description |
---|---|---|
option | List of <Option> | No available options |
Return values: List of MNSimpleMessageCategory
Permissions: None (public data)
getAllSimpleMessageTypes
Describes all available transactional message types within a category for this account.
Parameter | Type | Description |
---|---|---|
idMessageCategory | String | Message category |
option | List of <Option> | No available options |
Return values: List of MNSimpleMessageType
Permissions: None (public data)
findSimpleMessageTypeById
Returns the definition of a transactional message type
Parameter | Type | Description |
---|---|---|
idMessageType | String |
Return values: MNSimpleMessageType
Permissions: None (public data)
createSimpleMessageType
Creates a new transactional message type
Parameter | Type | Description |
---|---|---|
idMessageCategory | String | Id of the containing category |
name | String | |
option | List of <Option> | No available options |
Return values: String (id of the new created type)
Permissions: None (public data)
updateSimpleMessageType
Update metadata of a transactional message type
Parameter | Type | Description |
---|---|---|
idMessageType | String | Id of the message type |
option | List of <Option> | Available options: String name: modify the name of the message type |
Return values: String (id of the updated type)
Permissions: None (public data)
findSimpleMessageCategoryById
Returns the definition of a transactional message category
Parameter | Type | Description |
---|---|---|
idMessageCategory | String |
Return values: MNSimpleMessageCategory
Permissions: None (public data)
createSimpleMessageCategory
Creates a new transactional message category
Parameter | Type | Description |
---|---|---|
name | String | |
option | List of <Option> | No available options |
Return values: String (id of the new created category)
Permissions: None (public data)
updateSimpleMessageCategory
Update metadata of a transactional message category
Parameter | Type | Description |
---|---|---|
idMessageCatgory | String | Id of the message category |
option | List of <Option> | Available options: String name: modify the name of the message category |
Return values: Void
Permissions: None (public data)
getSimpleMessageTypeReport
Calculates a report on the status of transactional messages of a given message type.
This report considers only messages created inside a given time range.
Parameter | Type | Description |
---|---|---|
idMessageType | String | |
from | Datetime | Start of the time range (required) |
to | Datetime | Start of the time range (required) |
option | List of <Option> | Available options: String queryContacts: filter messages using a query on the contacts bound to the messages in the time range |
Return values: MNSimpleMessageTypeReport
Permissions: None (public data)
getAccountCreditAmount
Returns the residual credit for the given channel.
- For the account with 'flat' plan: it returns residual credit plus automatic credit
- For the account with 'final balance' plan: it returns always -1
Parameter | Type | Description |
---|---|---|
channel | String | Possible values: email, sms |
option | List of <Option> |
Return values: Number.
It returns a value approximated to the nearest thousand rounding down if credit is 1000; it returns 0 if credit is 0 or negative.
Permissions: None (public data)
batchGetSimpleMessageStatusByExternalId
Returns the status of N transactional messages by their external ID
Parameter | Type | Description |
---|---|---|
externalId | String | The external assigned ID of the message |
Return values: MNSimpleMessageCategory
Permissions: If referred to a database contact, database data export permissions for the specific database.
If not referred to a database contact, database data export permissions for all the databases.
Legacy functions
sendSimpleMessage (Legacy)
Sends a notification email (transactional) to a contact.
This operation is deprecated since API version 18.02, please use sendEmailMessage or sendSmsMessage
The message is defined by MessageTemplate. Contact's data can be used in the message by using placeholders.
Return value is id for a notification message, whose status is accessible through getSimpleMessageStatus
Parameter | Type | Description |
---|---|---|
address | String | |
idDatabase | String | |
contactPrimaryKey | String | |
messageTemplate | MessageTemplate |
PlaceHolder placeHolders: requests the message resending Some default placeholders are defined: "[PASSWORD]", "[USERNAME]", "[EMAIL]" , "[CELL]". |
Return values: String
Permissions: Send communications and send communications to contacts of the database
batchSendSimpleMessage (Legacy)
Sends a list of notification emails to the contact defined in every SendSimpleMessageValues
The message is sent to the address indicated in address, not to the contact's email address
The message is defined by MessageTemplate. Contact's data can be used in the message by using placeholders.
Return value is a list of SendSimpleMessageOperation that contains information such as notification messages' id, whose status is accessible by batchGetSimpleMessageStatus
Parameter | Type | Description |
---|---|---|
message | SendSimpleMessageValues |
PlaceHolder placeHolders: requests the message resending Some default placeholders are defined: "[PASSWORD]", "[USERNAME]", "[EMAIL]" , "[CELL]". |
Return values: List of SendSimpleMessageOperation
Permissions: Send communications and send communications to contacts of the database
batchSendSingleNewsletter (Legacy)
Sends a communication copy to a generic address (that could even not be in the database) for every SendSingleNewsletterValues that is passed.
Return value is a list of SendSimpleMessageOperation that contains information such as notification messages' id, whose status is accessible by batchGetSimpleMessageStatus
Parameter | Type | Description |
---|---|---|
messages | SendSingleNewsletterValues | Available options: Boolean lookupReader: to use a contact data String forceReaderId: to force the use of a specific contact |
Return values: List of SendSingleNewsletterOperation
Permissions: Send newsletters and send newsletter to contacts of the database
getMessageStatus (Legacy)
Returns a message delivery status.
Parameter | Type |
---|---|
idLaunch | String |
idMessage | String |
options | List of <Option> |
Return values: MNMessageStatus
Permissions: Send communications
batchGetMessageStatus (Legacy)
Returns the delivery status for a series of messages.
Parameter | Type |
---|---|
idLaunch | String |
idMessage | List of String |
options | List of <Option> |
Return values: List of MNMessageStatus
Permissions: Send communications