The Transactions REST API allows sending single e-mails to individual contacts that are defined with a valid permission in the account. Typically, these e-mails are sent as part of a lifecycle event associated with the contact, e.g. an order confirmation.
In this document, the word transaction refers to a data object (i.e. a resource) that describes the content of one such individual e-mail. In particular, a transaction has a contact reference, transaction content, a transaction type and (optionally) a list of attachments:
- The contact reference identifies the receiver of the e-mail generated as a result of the transaction, either by their Maileon ID, their external ID or their email address.
- The transaction content is a JSON document that describes the transaction. This document is later used to fill in the individual details in the e-mail template.
- The transaction type describes the syntax of a class of transactions (such as “Order”). Maileon treats transaction content as a set of attribute values. A transaction type defines which attributes are allowed for that class of transactions. This is used as a template to validate each individual transaction.
- Optionally, any number of e-mail-attachments to send to the customer may be submitted with the transaction.
To get started quickly with transactions, make sure to read our cheatsheet: Transactions Cheatsheet
Valid types for are:
|string||The length must not exceed 1000 characters.|
|date||Allowed patterns: yyyy-mm-dd|
|timestamp||Allowed patterns: yyyy-mm-dd hh:mm:ss|
|boolean||Allowed values are: true and false|
|integer||Integer numbers are limited to 32 bit values|
|float||64 bit signed floating point number (compare with double datatype in Java)|
|json||A JSON encoded data structure; lists are allowed|