Document Transactional

Send transaction to other email

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

POST https://app-a.nipamail.com/api/v1/transactional
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
from_email string The sender's email address. Yes
from_name string The sender's name. Yes
to string The recipient's email address. 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
camp_id string The campaign_id use for tracking statistic, cannot duplicate.
Defaults to transactionID [user_id + auto_gen_id()]

Multi email to, each email must be separated by comma (e.g. email1@email.com, email2@email.com, ...)
Example Request
POST /api/v1/transactional HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com

from_name=userSupport
from_email=example@mail.com
to=mailto@mail.com
subject=Welcome to transactional system
body=content html
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": {
    "sent_total": 1,
    "sent_delivered": 1,
    "date": "2017-04-29 11:50:24"
  }
}

Show all transactional lists

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

GET https://app-a.nipamail.com/api/v1/transactional/lists
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
page integer set limit of result page.
Defaults to 1 of limit 25 item
Example Request
POST /api/v1/transactional/lists HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
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": {
    "campaigns_all_count": 2,
    "campaigns_list_count": 2,
    "campaigns_result": [
      {
      "campaign_id": "ACT1327628419",
      "campaign_name": "test API1",
      "campaign_created": "2017-03-28 09:03:33"
      },
      {
      "campaign_id": "CXUT3714621740",
      "campaign_name": "Transactional",
      "campaign_created": "2017-04-27 11:44:59"
      }
    ]
  }
}

View transactional

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

GET https://app-a.nipamail.com/api/v1/transactional/{$id}
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
campaign_id string The campaign_id use for tracking statistic. Yes
page integer set limit of result page.
Defaults to 1 of limit 25 item
opt enum {sented, delivered, bounce, spam, clicked, opened} Option to Read related information campaign.

If you want to report a relevant section. Can be browsed with
(e.g. https://app-a.nipamail.com/api/v1/transactional?opt=opened OR https://app-a.nipamail.com/api/v1/transactional?opt=clicked...)
Example Request
POST /api/v1/transactional/CXUT3714621740 HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
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": {
    "campaign_id": "CXUT3714621740",
    "total_sent": "10",
    "total_delivered": "10",
    "total_open": "8",
    "total_click": "5",
    "total_spam": "0",
    "total_unsubscriber": "0",
    "total_hard_bounce": "0",
    "total_soft_bounce": "0",
    "unique_open": "8",
    "unique_click": "4"
  }
}

Response Code
Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id was expired.
404 error The list not found.