55
Below, we listed the request parameters that required on /transactional API and resource url.
* domain_app : a and b
| Parameter | Type | Description | Required |
|---|---|---|---|
| accept_token | string | The accept_token from Authentication API. | Yes |
| message |
|
|
|
| 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. "true" or "false" |
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"
},
{
"from_name": "Support Nipamail",
"from_email": "support@nipamail.com",
"to": "example2@mail.com"
}
],
"subject": "Example subject mail1.",
"body": "ทดสอบ Mutiple email"
}'
{
"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"
}
Below, we listed the request parameters that required on /transactional API and resource url.
| Parameter | Type | Description | Required |
|---|---|---|---|
| accept_token | string | The accept_token from Authentication API. | Yes |
| bulkId | string | The tran_id use for tracking statistic. | Yes |
curl -X GET 'https://app-{{ domain_app }}.nipamail.com/v2/transactional/multipost/np8cec46ccd9fca6858f29ad12a6773677?accept_token=NPAPP-IGBmfucf...'
-H 'cache-control: no-cache'
{
"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"
}