Articles in this section

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
Parameter Description
Action AccountSummary
AccountId The MessageGears account id to which this item belongs.
ApiKey A secret key only known by you. Keep this key confidential.
ActivityDate The 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
Parameter Data Type Description
ActivityDate Date Confirmation of the date that was supplied in the request.
Messages Integer  The total number of email message that were submitted to the service for processing for both transactional and bulk jobs.
Clicks Integer  The total number of trackable links that were clicked.
Opens  Integer  The total number of messages that were opened.
Bounces  Integer  The total number of messages that were confirmed as undelivered.
Deliveries  Integer The total number of messages that were successfully delivered.
Unsubscribes  Integer The total number of unsubscribe requests received. This includes any optional MessageGears "unsubscribe" links, as well as "list unsubscribe" headers.
SpamComplaints  Integer The total number of times recipients clicked the "report spam" button, or sent their messages to the MessageGears abuse mailbox.
RenderErrors  Integer  The 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>
<Unsubsribes>0</Unsubsribes>
<Deliveries>998121</Deliveries>
<SpamComplaints>2</SpamComplaints>
<RenderErrors>0</RenderErrors>
</AccountSummary>
</AccountSummaryResponse>
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
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);
}
}
}
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.