Get activities

Post /statistics/activities

Introduction

Get all datas provided by your sent aggregated per day

Parameters:

Name Description Type Mandatory
dateBegin Date begin on YYYY-MM-ddThh:mm:ss format Int No
dateEnd Date end on YYYY-MM-ddThh:mm:ss format Int No
froms Array of Senders email Array No
apiKeys Array of api keys Array No
tags Array of tags Array No

Response:

Name Description Type
date

An array with information about each email on date

Name Description Type
delivered Number of email delivered Int
open Number of open Int
click Number of click Int
unsubscribed Number of unsubscribers Int
complaint Number of complaint Int
opener Number of opener Int
clicker Number of clicker Int
String
Programming language:

Request exemple:

							{
								"dateBegin": 1454545657,
								"dateEnd": 1564564564
							}
							

Response exemple:

								{
									"1438387200": 
									{
									    "delivered": 4255,
									    "open": 16,
									    "click": 11,
									    "unsubscribed": 0,
									    "complaint": 0,
									    "opener": 16,
									    "clicker": 10
								  	},
								  	"1441065600": 
								  	{
									    "delivered": 53,
									    "open": 25,
									    "click": 0,
									    "unsubscribed": 0,
									    "complaint": 0,
									    "opener": 20,
									    "clicker": 0
								  	},
								  	"1443657600": 
								  	{
									    "delivered": 182,
									    "open": 11,
									    "click": 1,
									    "unsubscribed": 0,
									    "complaint": 0,
									    "opener": 8,
									    "clicker": 1
								  	}
								}
							

Code example:

								curl -X POST -d '{"dateBegin":"1443046641","dateEnd":"1443219441"}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_API_USERNAME" -H "X-Tipimail-ApiKey:YOUR_API_KEY" https://api.tipimail.com/v1/statistics/activities
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$dateBegin = null;
	$dateEnd = null;
	$froms = null;
	$apiKeys = null;
	$tags = null;
	
	$result = $tipimail->getStatisticsService()->getActivityByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}

...

public class Example {
	
	public static void main(String[] args) {
		
		Tipimail tipimail = new Tipimail("YOUR_SMTP_USERNAME", "YOUR_API_KEY");
		
		try {
			
			nteger dateBegin = null;
			Integer dateEnd = null;
			ArrayList<String> froms = null;
			ArrayList<String> tags = null;
			ArrayList<String> apiKeys = null;
			
			HashMap<String, StatisticsActivity> activityByDate;
			activityByDate = tipimail.getStatisticsService().getActivityByDate(dateBegin, dateEnd, froms, tags, apiKeys);
		
		}
		catch (TipimailException e) {
			
		}
	
	}
	
}