Get email platforms
Post /statistics/emailplatforms/{type}
URL parameters:
| Name | Description | Type | Mandatory |
|---|---|---|---|
| / | All technologies used to read the email | String | No |
| /webmails | Filter by webmail | String | No |
| /webmails/total | Total per webmails | String | No |
| /applications | Filter by application | String | No |
| /applications/total | Total per applications | String | No |
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 email opens return on date / First day of the month
|
String |
Programming language:
Request exemple:
{
"dateBegin": "2019-01-20T09:00:00",
"dateEnd": "2019-01-21T22:59:59"
}
Response exemple:
{
"1438387200": [
{
"open": 16,
"name": "CHROME 43.0.2357.130",
"type": "application"
}
],
"1441065600": [
{
"open": 1,
"name": "FIREFOX11 11.0",
"type": "webmail"
},
{
"open": 10,
"name": "CHROME 44.0.2403.89",
"type": "application"
},
{
"open": 8,
"name": "CHROME 45.0.2454.85",
"type": "application"
},
{
"open": 4,
"name": "OUTLOOK2010 14",
"type": "application"
},
{
"open": 2,
"name": "CHROME 42.0.2311.90",
"type": "application"
}
],
"1443657600": [
{
"open": 6,
"name": "CHROME 45.0.2454.85",
"type": "application"
},
{
"open": 4,
"name": "CHROME 45.0.2454.101",
"type": "application"
},
{
"open": 1,
"name": "THUNDERBIRD3 38.2.0",
"type": "application"
}
]
}
Code example:
curl -X POST -d '{"dateBegin":"2019-01-20T09:00:00","dateEnd":"2019-01-21T22:59:59"}' -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/webmailorapplication
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()->getEmailPlatformsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getWebmailsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getWebmails($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getApplicationsByDate($dateBegin, $dateEnd, $froms, $tags, $apiKeys);
var_dump($result);
$result = $tipimail->getStatisticsService()->getApplications($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, ArrayList<StatisticsWebmailOrApplication>> emailPlatformsByDate;
emailPlatformsByDate = tipimail.getStatisticsService().getEmailPlatformsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
HashMap<String, ArrayList<StatisticsWebmailOrApplication>> webmailsByDate;
webmailsByDate = tipimail.getStatisticsService().getWebmailsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
StatisticsWebmailOrApplicationOpen webmails;
webmails = tipimail.getStatisticsService().getWebmails(dateBegin, dateEnd, froms, tags, apiKeys);
HashMap<String, ArrayList<StatisticsWebmailOrApplication>> applicationsByDate;
applicationsByDate = tipimail.getStatisticsService().getApplicationsByDate(dateBegin, dateEnd, froms, tags, apiKeys);
StatisticsWebmailOrApplicationOpen applications;
applications = tipimail.getStatisticsService().getApplications(dateBegin, dateEnd, froms, tags, apiKeys);
}
catch (TipimailException e) {
}
}
}