Envois par tags
Post /statistics/tags
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 :
Retourne le nombre de messages envoyés par la plateforme et leurs statuts selon les filtres
Nom | Description | Type | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tags |
Tableau contenant les informations de chaque email en fonction du tag
|
Array |
Langage de programmation :
Exemple de requête :
{ "dateBegin": 1454545657, "dateEnd": 1564564564, "tags":["welcome","password"] }
Exemple de réponse :
{ "welcome": { "error": 0, "rejected": 0, "requested": 36, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 36, "hardbounced": 0, "softbounced": 0, "open": 11, "click": 11, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 11, "clicker": 10 }, "password": { "error": 0, "rejected": 0, "requested": 36, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 36, "hardbounced": 0, "softbounced": 0, "open": 11, "click": 11, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 11, "clicker": 10 } }
Exemple de code :
curl -X POST -d '{"dateBegin":"1443046641","tags":["welcome","password"]}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/statistics/tags
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()->getSendsByTag($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, StatisticsSends> sendsByTag; sendsByTag = tipimail.getStatisticsService().getSendsByTag(dateBegin, dateEnd, froms, tags, apiKeys); } catch (TipimailException e) { } } }