Messages

Post /statistics/messages

Paramètres :

Nom Description Type Obligatoire
page Numéro de la page Int Non
pageSize Nombre d'éléments à retourner Int Non
dateBegin Date de début au format yyyy-MM-ddThh:mm:ssZ Int Non
dateEnd Date de fin au format yyyy-MM-ddThh:mm:ssZ 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
id Id du message String
apiKey Clé APi utilisée pour envoyer l'email String
createdDate Date en timestamp Int
lastStateDate Date du dernier status en timestamp Int
msg
Nom Description Type
from adresse email d'expédition String
email Email du destinataire String
subject Objet de l'email String
size Poids de l'email String
Object
tags
Nom Type
TAG1 if not null String or null
Array
lastState Dernier status de l'email Int
meta
Nom Type
meta string
Object
reason reason null
open ouvertures INT
click clic INT
openDetails
Nom Type
opening date String
Array
ClickDetails
Nom Type
Click date String
Array
Langage de programmation :

Exemple de requête :

							{
								"dateBegin":"2019-06-10T12:50:04",
								"dateEnd":"2019-06-12T12:50:04",
								"tags":["welcome"]
							}
							

Exemple de réponse :

								{
									"messages": [
										{
											"id": "5d00f65e99321602e57d89ae",
											"apiKey": "YOUR_API_KEY",
											"createdDate": "2019-06-12T12:55:54.306+0000",
											"lastStateDate": "2019-06-12T12:55:55.829+0000",
											"msg": {
												"from": "tipimail@tipimail.com",
												"email": "recipient@tipimail.com",
												"subject": "email subject",
												"size": 7070
											},
											"tags": [
												"documentation",
												"support"
											],
											"lastState": "delivered",
											"meta": {},
											"reason": null,
											"open": 0,
											"click": 0,
											"openDetails": [],
											"clickDetails": []
										},
										{
											"id": "5d00f4fc9932583ad076d962",
											"apiKey": "YOUR_API_KEY",
											"createdDate": "2019-06-12T12:50:02.345+0000",
											"lastStateDate": "2019-06-12T12:50:04.111+0000",
											"msg": {
												"from": "checker@tipimail.com",
												"email": "recipient@tipimail.com",
												"subject": "email subject",
												"size": 435
											},
											"tags": null,
											"lastState": "delivered",
											"meta": null,
											"reason": null,
											"open": 0,
											"click": 0,
											"openDetails": [],
											"clickDetails": []
										}
									],
									"total": 2
								}
							

Exemple de code :

								curl -X POST -d '{"dateBegin":"2019-06-12T12:50:04","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/messages
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$page = null;
	$pageSize = null;
	$dateBegin = null;
	$dateEnd = null;
	$froms = null;
	$apiKeys = null;
	$tags = null;
	
	$result = $tipimail->getStatisticsService()->getMessages($page, $pageSize, $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 page = null;
			Integer pageSize = null;
			Integer dateBegin = null;
			Integer dateEnd = null;
			ArrayList<String> froms = null;
			ArrayList<String> tags = null;
			ArrayList<String> apiKeys = null;
			
			StatisticsMessages messages;
			messages = tipimail.getStatisticsService().getMessages(page, pageSize, dateBegin, dateEnd, froms, tags, apiKeys);
		
		}
		catch (TipimailException e) {
			
		}
	
	}
	
}