getDomainStatisticsReport method
Retrieve inbox placement and engagement rates for the domains that you use to send email.
May throw TooManyRequestsException. May throw NotFoundException. May throw BadRequestException.
Parameter domain
:
The domain that you want to obtain deliverability metrics for.
Parameter endDate
:
The last day (in Unix time) that you want to obtain domain deliverability
metrics for. The EndDate
that you specify has to be less than
or equal to 30 days after the StartDate
.
Parameter startDate
:
The first day (in Unix time) that you want to obtain domain deliverability
metrics for.
Implementation
Future<GetDomainStatisticsReportResponse> getDomainStatisticsReport({
required String domain,
required DateTime endDate,
required DateTime startDate,
}) async {
ArgumentError.checkNotNull(domain, 'domain');
ArgumentError.checkNotNull(endDate, 'endDate');
ArgumentError.checkNotNull(startDate, 'startDate');
final $query = <String, List<String>>{
'EndDate': [_s.iso8601ToJson(endDate).toString()],
'StartDate': [_s.iso8601ToJson(startDate).toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/email/deliverability-dashboard/statistics-report/${Uri.encodeComponent(domain)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetDomainStatisticsReportResponse.fromJson(response);
}