Gets transactional email reporting statistics for a specified time period
This method retrieves your transactional email reporting statistics (number sent, delivered, opens, clicks, ISP complaints and bounces) for a specified time period.
This time period can be set with a specific end date, or statistics can be aggregated by all time, week, month or day.
SOAP action: http://apiconnector.com/v2/ApiService/GetTransactionalEmailStatistics
Input and output parameters
The input and output parameters for this method are:
Input parameters
- StartDate - required; dateTime
- EndDate - optional; dateTime
- AggregatedBy - optional; string ('AllTime', 'Month', 'Week', 'Day')
Output parameters
- GetTransactionalEmailStatisticsResult - array of TransactionalEmailStatistics
- TransactionalEmailStatistics
- StartDate - dateTime
- EndDate - dateTime
- NumSent - integer
- NumDelivered - integer
- NumOpens - integer
Example
using (var client = new ApiServiceClient())
{
client.ClientCredentials.UserName.UserName = "username";
client.ClientCredentials.UserName.Password = "password";
var startDate = new DateTime(2020, 01, 01, 00, 00, 00, DateTimeKind.Utc);
var endDate = DateTime.UtcNow;
var aggregatedBy = ApiAggregationPeriod.AllTime;
var result = client.GetTransactionalEmailStatistics(startDate, endDate, aggregatedBy);
}