1. Home
  2. Docs
  3. API Documentation
  4. Active APIs
  5. sendNotificationMailer

sendNotificationMailer

This API enables you to send out a notification email regarding a certain event caused by a customer to a list of email addresses.

An event can be explained as follows:

Consider a customer who attempts registering on your application software using a 2-step process but completes only the first step, thus leaving his registration process incomplete. You can send a notification email with information regarding this customer to your team by using this API.

Prerequisites for using this API:

• Your Juvlon account should have an email that can be used as a notification email. Ensure that this email contains the following information:
– It should clearly describe the event that occurred for your team.
– It should contain placeholders (personalization fields) for all the details of the customer that you would like to share with your team.

• Your Juvlon account should have a list that contains the email addresses of all the members of your team that you want to notify regarding the event.

The API needs to be called using an HTTP Post method with data in JSON format as shown below.

URL: https://api2.juvlon.com/v4/sendNotificationMailer

Json Parameters
'{"ApiKey":"$ApiKey",
    "mailerid":"$mailerid",
    "Transaction_SubID":"$Transaction_SubID",
    "Notification_ListID":"$Notification_ListID",
    "trackOpens":"$trackOpens",
    "trackClicks":"$trackClicks",
    "customField":"$customField"
}';
Arguments
NameTypeDescriptionDefault
apikeyStringMandatory) The ApiKey that gives you access to our HTTP APIs. The ApiKey authenticates you and helps us to identify your Juvlon account. It is common for all the requests in an API call and must be provided outside the request(s). 
maileridInt(Mandatory) The message ID of the already created email in your Juvlon account that you would like to send as the notification. 
Transaction_SubIDInt(Mandatory) The subscriber ID of your customer in your Juvlon account whose details you would like to send out in the notification email.
If you do not know the Subscriber ID of your customer in your Juvlon account, please use the “AddSingleSubscriber” API with the email address of your customer to fetch the same. This API will first look for a subscriber with a matching email address in your Juvlon account:
– If found, it will simply return the Subscriber ID.
– If not found, it will create a new subscriber and then return the Subscriber ID.
 
Notification_ListIDStringThe list containing all the subscribers that you would like to send the notification email to. 
trackOpensIntSet flag 1 to enable opens tracking, 0 (default) for no tracking. 
trackClicksIntSet flag 1 to enable clicks tracking, 0 (default) for no tracking. 
customFieldStringCustomized text for your internal tracking. 

Return value

TypeTypeDescription
CodeStringThe Success or Error response code as returned by the API. Please refer to the section “Possible-Response-Codes” for more details. 
StatusStringDescription of the error code returned. 
TransactionIDStringA number generated by the API to uniquely identify the current call. Also known as the API_Call_ID. 

Usage / Example(s)

PHP Example Code for Integration

$url = 'https://api2.juvlon.com/v4/sendNotificationMailer';
$data = '{"ApiKey":"KEY",
            "mailerid":"28",
            "Transaction_SubID":"98",
            "Notification_ListID":"5027",
            "trackOpens ":"1",
            "trackClicks ":"1",
            "customField ":"custom_text"
 }'; 
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$res1 = curl_exec($ch);
curl_close($ch);

Success-Response

HTTP/1.1
{
    "code":200,
    "status":"Success",
    "transactionId":327
}  

Error-Response

HTTP/1.1
{
    "code":403,
    "status":"Error"
} 

Possible-Response-Codes

200    Success: API Request Accepted
401    Error:Invalid Method
402    Error: Unauthorized/Empty Key
403    Error: Unauthorized/Invalid Key
404    Error: Account Sending Blocked
405    Error: Your Juvlon account is expired
448    Your Juvlon account is Deactivated
602    Error: No subscriber provided
454    Error: Subscriber does not exist
414    Error: Sender Domain Blacklisted
416    Error: Recipient Email Domain blacklisted
417    Bounced
418    Delivered
443    Error:INACTIVE Subscriber
444    Low Subscriber credit
445    Low Email credit
451    Opened
452    Clicked