Répartition géographique
Post /statistics/localisations
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 |
|---|---|---|
| open | Nombre d'ouvertures | Int |
| click | Nombre de clicks | Int |
| opener | Nombre d'ouvreurs | Int |
| clicker | Nombre de cliqueurs | Int |
| country | Pays | String |
| city | Ville | String |
| latitude | Float | |
| longitude | Float |
Langage de programmation :
Exemple de requête :
{
"dateBegin": 1454545657,
"dateEnd": 1564564564
}
Exemple de réponse :
[
{
"open": 3,
"click": 10,
"opener": 0,
"clicker": 3,
"country": "France",
"city": "Lille",
"latitude": 50.6310675,
"longitude": 3.0471604
},
{
"open": 1,
"click": 5,
"opener": 0,
"clicker": 1,
"country": "France",
"city": "Paris",
"latitude": 48.8588589,
"longitude": 2.3475569
}
]
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/localisations
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()->getLocalisations($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;
ArrayList<StatisticsLocalisation> localisations;
localisations = tipimail.getStatisticsService().getLocalisations(dateBegin, dateEnd, froms, tags, apiKeys);
}
catch (TipimailException e) {
}
}
}