Activités
Post /statistics/activities
Introduction
Récupérer les données générés par vos envois aggrégées par jour
Paramètres :
Nom | Description | Type | Obligatoire |
---|---|---|---|
dateBegin | Date de début au format YYYY-MM-ddThh:mm:ss | Int | Non |
dateEnd | Date de fin au format YYYY-MM-ddThh:mm:ss | Int | Non |
froms | Email(s) de l'expéditeur | Array | Non |
apiKeys | Tableau de clés Api | Array | Non |
tags | Tableau de tags | Array | Non |
Réponse :
Nom | Description | Type | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
date |
Tableau contenant les informations de chaque email en fonction de la date
|
String |
Langage de programmation :
Exemple de requête :
{ "dateBegin": 1454545657, "dateEnd": 1564564564 }
Exemple de réponse :
{ "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 } }
Exemple de code :
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) { } } }