55 Transactional | Email Transactional Service Online

Document Transactional

Send transaction to other email

Below, we listed the request parameters that required on /transactional API and resource url.

POST https://app-{{ domain_app }}.nipamail.com/v2/transactional/multipost

* domain_app : a, b and x

Parameter Type Description Required
accept_token string The accept_token from Authentication API. Yes
message
  • from_email
  • from_name
  • to
  • reply_email
  • reply_name
  • cc
  • bcc
  • parameters
    The variable that will be used to change the value in the body.
  • Yes
  • Yes
  • Yes
subject string The email's subject. Yes
body string The content email in html form, in case use template key put custom field in json format here. Yes
bulkId string The key need to use get analytics.
template_id string The template key need to use html content.
package_code string If you have more than one package, you can choose which package to send. If package_code is not sent, we will use the default package to send.
attachment file The json string of attachments specified with file name and file path.
max size 500Kb. [ gif | jpg | png | pdf | xlsx | csv | xls | zip | rar ]
disable_unsubscribe string Disable unsubscribe menu tab.
Example Request
curl -X POST 'https://app-{{ domain_app }}.nipamail.com/v2/transactional/multipost?accept_token=NPAPP-IGBmfucf...'
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{ 
	"message" :
	[
		{
			"from_name": "Support Nipamail",
			"from_email": "support@nipamail.com",
			"to": "example@mail.com",
			"subject": "Example subject mail.",
			"body": "mail content 1"
		},
		{
			"from_name": "Support Nipamail",
			"from_email": "support@nipamail.com",
			"to": "example2@mail.com",
			"subject": "Example subject mail.",
			"body": "mail content 2"
		}
	]
}'      
                                
Example Result Success
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
    "status": "success",
    "code": 200,
    "bulkId": "np8cec46ccd9fca6858f29ad12a6773677",
    "data": [
        {
            "bulkId": "np8cec46ccd9fca6858f29ad12a6773677",
            "tranId": "051ce2d0f8cdefd8a224c838cd259cb5",
            "from": "support@nipamail.com",
            "to": "example@mail.com"
        },
        {
            "bulkId": "np8cec46ccd9fca6858f29ad12a6773677",
            "tranId": "87cfa5c7bb2d24647a0a3fc6c34c0499",
            "from": "support@nipamail.com",
            "to": "example2@mail.com"
        }
    ],
    "message": "The email was queued delivered.",
    "date": "2020-02-04 16:53:16"
}

View transactional

Below, we listed the request parameters that required on /transactional API and resource url.

GET https://app-{{ domain_app }}.nipamail.com/v2/transactional/multipost/{$bulkId}
Parameter Type Description Required
accept_token string The accept_token from Authentication API. Yes
bulkId string The tran_id use for tracking statistic. Yes

If you want to report a relevant section. Can be browsed with
(e.g. https://app-{{ domain_app }}.nipamail.com/v1.0/transactional?fields=open&accept_token=ffa6728620... OR https://app-{{ domain_app }}.nipamail.com/v1.0/transactional?fields=open,click&accept_token=ffa6728...)
Example Request
curl -X GET  'https://app-{{ domain_app }}.nipamail.com/v2/transactional/multipost/np8cec46ccd9fca6858f29ad12a6773677?accept_token=NPAPP-IGBmfucf...'
-H 'cache-control: no-cache'
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
    "status": "success",
    "code": 200,
    "data": [
        {
            "tran_id": "740b6b220696caddfd5aeb9c5bfce540",
            "bulkId": "npf7a5ed490ccfbbbc1f5c365c6553aa71",
            "from": "support@nipamail.com",
            "to": "example@mail.com",
            "cc": null,
            "bcc": null,
            "open": 3,
            "click": 0,
            "logged": "2020-02-04 12:24:04+0700",
            "timestamp": 1580793797,
            "status": "delivered",
            "errors": null
        },
        {
            "tran_id": "ab0f1092283c77b168d44b34587491b7",
            "bulkId": "npf7a5ed490ccfbbbc1f5c365c6553aa71",
            "from": "support@nipamail.com",
            "to": "example2@main.com",
            "cc": null,
            "bcc": null,
            "open": 0,
            "click": 0,
            "status": "error",
            "errors": {
                "type": "filter",
                "remark": "BAD_DOMAIN",
                "message": "Do not go through the conditions: bounce-domain"
            },
            "timestamp": 1580793797
        }
    ],
    
    "date": "2020-02-04 16:57:41"
}