Skip to main content

AccountSummary v3.1

AccountSummary is used to check the activity that occurred across all jobs (both transactional and bulk) for a given date.

Deprecated Versions​

v3.0 (unchanged in v3.1)

Required Parameters​

ParameterDescription
ActionAccountSummary
AccountIdThe MessageGears account id to which this item belongs.
ApiKeyA secret key only known by you. Keep this key confidential.
ActivityDateThe date of the summary data to be retrieved. Must be in the format of yyyy-MM (for monthly totals) or yyyy-MM-dd (for daily totals). All data will be summarized in EDT.

Response Values​

ParameterData TypeDescription
ActivityDateDateConfirmation of the date that was supplied in the request.
MessagesIntegerThe total number of email message that were submitted to the service for processing for both transactional and bulk jobs.
ClicksIntegerThe total number of trackable links that were clicked.
OpensIntegerThe total number of messages that were opened.
BouncesIntegerThe total number of messages that were confirmed as undelivered.
DeliveriesIntegerThe total number of messages that were successfully delivered.
UnsubscribesIntegerThe total number of unsubscribe requests received. This includes any optional MessageGears "unsubscribe" links, as well as "list unsubscribe" headers.
SpamComplaintsIntegerThe total number of times recipients clicked the "report spam" button, or sent their messages to the MessageGears abuse mailbox.
RenderErrorsIntegerThe total number of messages that could not be delivered as a result of errors in the message content. This usually occurs when there is syntax error in the Freemarker or Velocity script (if any) contained in the message content.

Programming Examples​

REST​

Request

https://api.messagegears.net/3.1/WebService  
?Action=AccountSummary
&AccountId=123456789
&ApiKey=8bb6118f8fd6935ad0876a3be34a717d32708ffd
&ActivityDate=2010-07-04

Response

<AccountSummaryResponse>  
<RequestId>71d7261e-bbf7-487d-b201-6d3557370cd2</RequestId>
<Result>REQUEST_SUCCESSFUL</Result>
<AccountSummary>
<ActivityDate>2010-07-04</ActivityDate>
<Messages>1000000</Messages>
<Clicks>123231</Clicks>
<Opens>152323</Opens>
<Bounces>1283</Bounces>
<Unsubscribes>0</Unsubscribes>
<Deliveries>998121</Deliveries>
<SpamComplaints>2</SpamComplaints>
<RenderErrors>0</RenderErrors>
</AccountSummary>
</AccountSummaryResponse>

Java SDK​

Click here for more information on using the MessageGears Java SDK

package com.messagegears.sdk.examples;

import java.util.Date;

import com.messagegears.sdk.v3_1.AccountSummaryResponse;
import com.messagegears.sdk.MessageGearsClient;
import com.messagegears.sdk.MessageGearsProperties;
import com.messagegears.sdk.model.request.AccountSummaryRequest;
import com.messagegears.sdk.output.ScreenWriter;

public class AccountSummaryExample {

public static final String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
public static final String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";

public static void main(String[] args) {
// Create the properties object containing the necessary properties
MessageGearsProperties props = new MessageGearsProperties();
props.setMyMessageGearsAccountId(MY_MESSAGEGEARS_ACCOUNT_ID);
props.setMyMessageGearsApiKey(MY_MESSAGEGEARS_API_KEY);

// Create the MessageGears client object
MessageGearsClient client = new MessageGearsClient(props);

// Get the current date, or set to the date desired
Date date = new Date();

AccountSummaryRequest request = new AccountSummaryRequest();
request.setDate(date);

// Invoke the AccountSummary API
AccountSummaryResponse response = client.accountSummary(request);

// Print the result
ScreenWriter.printResponse(response);
}
}

C# SDK​

Click here for more information on using the MessageGears .Net SDK

using System;
using System.IO;
using MessageGears;
using MessageGears.Model;
using MessageGears.Model.Generated;

namespace MessageGears.Examples
{
public class AccountSummaryExample
{
public const String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
public const String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";

public static void Main()
{
// Create the properties object containing the necessary properties
MessageGearsProperties props = new MessageGearsProperties();
props.MyMessageGearsAccountId = MY_MESSAGEGEARS_ACCOUNT_ID;
props.MyMessageGearsApiKey = MY_MESSAGEGEARS_API_KEY;

// Create the MessageGears client object
MessageGearsClient client = new MessageGearsClient(props);

// Get the current date, or set to the date desired
DateTime dateTime = DateTime.Today;

// Invoke the AccountSummary API
AccountSummaryResponse response = client.AccountSummary(dateTime);

// Print the result
client.PrintResponse(response);
}
}
}