diff --git a/MailJetClient/MailJet.Client.csproj b/MailJetClient/MailJet.Client.csproj
index 06d53a3..9175729 100644
--- a/MailJetClient/MailJet.Client.csproj
+++ b/MailJetClient/MailJet.Client.csproj
@@ -50,6 +50,7 @@
+
diff --git a/MailJetClient/MailJetClient.cs b/MailJetClient/MailJetClient.cs
index f954abd..65c31b7 100644
--- a/MailJetClient/MailJetClient.cs
+++ b/MailJetClient/MailJetClient.cs
@@ -520,6 +520,24 @@ public Response GetListRecipient(
return ExecuteRequest(request);
}
+ ///
+ /// Get aggregate graph statistics available for this apikey.
+ ///
+ /// Only show statistics for this aggregation.
+ /// The period of the aggregates (24 hours or 7 days).
+ /// Aggregated campaign statistics grouped over intervals.
+ public Response GetAggregateGraphStatistics(int? CampaignAggregateID = null, string Range = null) {
+ var request = new RestRequest("REST/aggregategraphstatistics", Method.GET);
+
+ if (CampaignAggregateID.HasValue)
+ request.AddParameter("CampaignAggregateID", CampaignAggregateID.Value);
+
+ if (!String.IsNullOrWhiteSpace(Range))
+ request.AddParameter("Range", Range);
+
+ return ExecuteRequest(request);
+ }
+
private Response ExecuteRequest(RestRequest request) where T : DataItem
{
request.RequestFormat = DataFormat.Json;
diff --git a/MailJetClient/Response/Data/AggregateGraphStatistics.cs b/MailJetClient/Response/Data/AggregateGraphStatistics.cs
new file mode 100644
index 0000000..7fcaabe
--- /dev/null
+++ b/MailJetClient/Response/Data/AggregateGraphStatistics.cs
@@ -0,0 +1,85 @@
+namespace MailJet.Client.Response.Data
+{
+ public class AggregateGraphStatistics: DataItem
+ {
+ ///
+ /// Number of blocked messages.
+ ///
+ public double BlockedCount { get; set; }
+
+ ///
+ /// BlockedStdDev count.
+ ///
+ public double BlockedStdDev { get; set; }
+
+ ///
+ /// Number of bounced messages.
+ ///
+ public double BouncedCount { get; set; }
+
+ ///
+ /// BouncedStdDev count.
+ ///
+ public double BouncedStdDev { get; set; }
+
+ ///
+ /// The ID of campaign aggregate object that corresponds with the statistics.
+ ///
+ public long CampaignAggregateID { get; set; }
+
+ ///
+ /// Number of registered clicks.
+ ///
+ public double ClickedCount { get; set; }
+
+ ///
+ /// ClickedStdDev count.
+ ///
+ public double ClickedStdDev { get; set; }
+
+ ///
+ /// Number of open registrations.
+ ///
+ public double OpenedCount { get; set; }
+
+ ///
+ /// OpenedStdDev count.
+ ///
+ public double OpenedStdDev { get; set; }
+
+ ///
+ /// Reference time in textual form.
+ ///
+ public long RefTimestamp { get; set; }
+
+ ///
+ /// Number of sent messages.
+ ///
+ public double SentCount { get; set; }
+
+ ///
+ /// SentStdDev count.
+ ///
+ public double SentStdDev { get; set; }
+
+ ///
+ /// Number of spam complains.
+ ///
+ public double SpamComplaintCount { get; set; }
+
+ ///
+ /// SpamcomplaintStdDev count.
+ ///
+ public double SpamcomplaintStdDev { get; set; }
+
+ ///
+ /// Number of registered unsubscribe requests.
+ ///
+ public double UnsubscribedCount { get; set; }
+
+ ///
+ /// UnsubscribedStdDev count.
+ ///
+ public double UnsubscribedStdDev { get; set; }
+ }
+}