Envois par domaines
Post /statistics/domains
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
domain |
Tableau contenant les informations de chaque email en fonction du domaine
|
Array |
Langage de programmation :
Exemple de requête :
{ "dateBegin":1454545657, "dateEnd":1564564564, "froms":["from@example.com"], "apiKeys":[], "tags":[] }
Exemple de réponse :
{ "gmail.com": { "error": 0, "rejected": 0, "requested": 1, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 1, "hardbounced": 0, "softbounced": 0, "open": 0, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 0, "clicker": 0 }, "hotmail.fr": { "error": 0, "rejected": 0, "requested": 3, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 3, "hardbounced": 0, "softbounced": 0, "open": 2, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 2, "clicker": 0 }, "yahoo.fr": { "error": 0, "rejected": 0, "requested": 9, "deferred": 0, "scheduled": 0, "filtered": 0, "delivered": 8, "hardbounced": 0, "softbounced": 0, "open": 0, "click": 0, "read": 0, "unsubscribed": 0, "complaint": 0, "opener": 0, "clicker": 0 } }
Exemple de code :
curl -X POST -d '{"dateBegin":"1443046641","dateEnd":"1443219441","from":["email1@example.com", "email2@tipimail.com"]}' -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/domains
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()->getSendsByDomain($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> sendsByDomain; sendsByDomain = tipimail.getStatisticsService().getSendsByDomain(dateBegin, dateEnd, froms, tags, apiKeys); } catch (TipimailException e) { } } }