Get localisations
Post /statistics/localisations
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 |
---|---|---|
open | Number of open | Int |
click | Number of click | Int |
opener | Number of opener | Int |
clicker | Number of clicker | Int |
country | Country's name | String |
city | City's name | String |
latitude | Float | |
longitude | Float |
Programming language:
Request exemple:
{ "dateBegin": 1454545657, "dateEnd": 1564564564 }
Response exemple:
[ { "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 } ]
Code example:
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) { } } }