/* tslint:disable */
/* eslint-disable */
/**
* Constant Contact API v3
* Swagger build version 3.0.2475
*
* The version of the OpenAPI document: 1.0.116
* Contact: webservices@constantcontact.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import { GetBouncesReport200Response } from '../models';
// @ts-ignore
import { GetCampaignActivityLinkReport200Response } from '../models';
// @ts-ignore
import { GetClicksReport200Response } from '../models';
// @ts-ignore
import { GetDidNotOpensReport200Response } from '../models';
// @ts-ignore
import { GetEmailCampaignActivityReport200Response } from '../models';
// @ts-ignore
import { GetEmailCampaignReport200Response } from '../models';
// @ts-ignore
import { GetEmailOpensReport200Response } from '../models';
// @ts-ignore
import { GetEmailSendsReport200Response } from '../models';
// @ts-ignore
import { GetEmailStatsReport200Response } from '../models';
// @ts-ignore
import { GetForwardsReport200Response } from '../models';
// @ts-ignore
import { GetOptoutsReport200Response } from '../models';
/**
* EmailReportingApi - axios parameter creator
* @export
*/
export const EmailReportingApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact\'s email address, unique ID, and the email bounce date and time. Use the bounce_code query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
* @summary GET an Email Bounces Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {Array} [bounceCode] To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBouncesReport: async (campaignActivityId: string, bounceCode?: Array, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getBouncesReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/bounces`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (bounceCode) {
localVarQueryParameter['bounce_code'] = bounceCode;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
* @summary GET an Email Links Report
* @param {string} campaignActivityId The unique ID for an email campaign activity.
* @param {boolean} [noClicks] Set this query parameter to `true` to return details for links that were not clicked in the response results.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCampaignActivityLinkReport: async (campaignActivityId: string, noClicks?: boolean, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getCampaignActivityLinkReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/links`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (noClicks !== undefined) {
localVarQueryParameter['no_clicks'] = noClicks;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
* @summary GET an Email Clicks Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {number} [urlId] The ID that uniquely identifies a single link URL for which you want to get a clicks report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getClicksReport: async (campaignActivityId: string, urlId?: number, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getClicksReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/clicks`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (urlId !== undefined) {
localVarQueryParameter['url_id'] = urlId;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
* @summary GET an Email Did Not Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDidNotOpensReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getDidNotOpensReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/didnotopens`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
* @summary GET an Email Campaign Activity Stats Report
* @param {string} campaignActivityIds A comma-separated list of `campaign_activity_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailCampaignActivityReport: async (campaignActivityIds: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityIds' is not null or undefined
assertParamExists('getEmailCampaignActivityReport', 'campaignActivityIds', campaignActivityIds)
const localVarPath = `/reports/stats/email_campaign_activities/{campaign_activity_ids}`
.replace(`{${"campaign_activity_ids"}}`, encodeURIComponent(String(campaignActivityIds)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date). Use the limit query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
* @summary GET an Email Campaigns Summary Report
* @param {string} [limit] Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailCampaignReport: async (limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
const localVarPath = `/reports/summary_reports/email_campaign_summaries`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
* @summary GET an Email Opens Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailOpensReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getEmailOpensReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/opens`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact\'s email address, the contact\'s first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
* @summary GET an Email Sends Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailSendsReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getEmailSendsReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/sends`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
* @summary GET an Email Campaign Stats Report
* @param {string} campaignIds A comma-separated list of `campaign_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailStatsReport: async (campaignIds: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignIds' is not null or undefined
assertParamExists('getEmailStatsReport', 'campaignIds', campaignIds)
const localVarPath = `/reports/stats/email_campaigns/{campaign_ids}`
.replace(`{${"campaign_ids"}}`, encodeURIComponent(String(campaignIds)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
* @summary GET an Email Forwards Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getForwardsReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getForwardsReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/forwards`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact\'s email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
* @summary GET an Email Opt-outs Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOptoutsReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getOptoutsReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/optouts`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
* @summary GET an Email Unique Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUniqueOpensReport: async (campaignActivityId: string, limit?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'campaignActivityId' is not null or undefined
assertParamExists('getUniqueOpensReport', 'campaignActivityId', campaignActivityId)
const localVarPath = `/reports/email_reports/{campaign_activity_id}/tracking/unique_opens`
.replace(`{${"campaign_activity_id"}}`, encodeURIComponent(String(campaignActivityId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication oauth2_access_code required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_access_code", ["campaign_data"], configuration)
// authentication oauth2_implicit required
// oauth required
await setOAuthToObject(localVarHeaderParameter, "oauth2_implicit", ["campaign_data"], configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* EmailReportingApi - functional programming interface
* @export
*/
export const EmailReportingApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EmailReportingApiAxiosParamCreator(configuration)
return {
/**
* Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact\'s email address, unique ID, and the email bounce date and time. Use the bounce_code query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
* @summary GET an Email Bounces Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {Array} [bounceCode] To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getBouncesReport(campaignActivityId: string, bounceCode?: Array, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getBouncesReport(campaignActivityId, bounceCode, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getBouncesReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
* @summary GET an Email Links Report
* @param {string} campaignActivityId The unique ID for an email campaign activity.
* @param {boolean} [noClicks] Set this query parameter to `true` to return details for links that were not clicked in the response results.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCampaignActivityLinkReport(campaignActivityId: string, noClicks?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaignActivityLinkReport(campaignActivityId, noClicks, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getCampaignActivityLinkReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
* @summary GET an Email Clicks Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {number} [urlId] The ID that uniquely identifies a single link URL for which you want to get a clicks report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getClicksReport(campaignActivityId: string, urlId?: number, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getClicksReport(campaignActivityId, urlId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getClicksReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
* @summary GET an Email Did Not Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getDidNotOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getDidNotOpensReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getDidNotOpensReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
* @summary GET an Email Campaign Activity Stats Report
* @param {string} campaignActivityIds A comma-separated list of `campaign_activity_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEmailCampaignActivityReport(campaignActivityIds: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailCampaignActivityReport(campaignActivityIds, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getEmailCampaignActivityReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date). Use the limit query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
* @summary GET an Email Campaigns Summary Report
* @param {string} [limit] Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEmailCampaignReport(limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailCampaignReport(limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getEmailCampaignReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
* @summary GET an Email Opens Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEmailOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailOpensReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getEmailOpensReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact\'s email address, the contact\'s first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
* @summary GET an Email Sends Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEmailSendsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailSendsReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getEmailSendsReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
* @summary GET an Email Campaign Stats Report
* @param {string} campaignIds A comma-separated list of `campaign_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEmailStatsReport(campaignIds: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEmailStatsReport(campaignIds, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getEmailStatsReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
* @summary GET an Email Forwards Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getForwardsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getForwardsReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getForwardsReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact\'s email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
* @summary GET an Email Opt-outs Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getOptoutsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getOptoutsReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getOptoutsReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
* @summary GET an Email Unique Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getUniqueOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getUniqueOpensReport(campaignActivityId, limit, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['EmailReportingApi.getUniqueOpensReport']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
}
};
/**
* EmailReportingApi - factory interface
* @export
*/
export const EmailReportingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EmailReportingApiFp(configuration)
return {
/**
* Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact\'s email address, unique ID, and the email bounce date and time. Use the bounce_code query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
* @summary GET an Email Bounces Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {Array} [bounceCode] To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBouncesReport(campaignActivityId: string, bounceCode?: Array, limit?: string, options?: any): AxiosPromise {
return localVarFp.getBouncesReport(campaignActivityId, bounceCode, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
* @summary GET an Email Links Report
* @param {string} campaignActivityId The unique ID for an email campaign activity.
* @param {boolean} [noClicks] Set this query parameter to `true` to return details for links that were not clicked in the response results.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCampaignActivityLinkReport(campaignActivityId: string, noClicks?: boolean, options?: any): AxiosPromise {
return localVarFp.getCampaignActivityLinkReport(campaignActivityId, noClicks, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
* @summary GET an Email Clicks Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {number} [urlId] The ID that uniquely identifies a single link URL for which you want to get a clicks report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getClicksReport(campaignActivityId: string, urlId?: number, limit?: string, options?: any): AxiosPromise {
return localVarFp.getClicksReport(campaignActivityId, urlId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
* @summary GET an Email Did Not Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getDidNotOpensReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getDidNotOpensReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
* @summary GET an Email Campaign Activity Stats Report
* @param {string} campaignActivityIds A comma-separated list of `campaign_activity_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailCampaignActivityReport(campaignActivityIds: string, options?: any): AxiosPromise {
return localVarFp.getEmailCampaignActivityReport(campaignActivityIds, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date). Use the limit query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
* @summary GET an Email Campaigns Summary Report
* @param {string} [limit] Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailCampaignReport(limit?: string, options?: any): AxiosPromise {
return localVarFp.getEmailCampaignReport(limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
* @summary GET an Email Opens Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailOpensReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getEmailOpensReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact\'s email address, the contact\'s first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
* @summary GET an Email Sends Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailSendsReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getEmailSendsReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
* @summary GET an Email Campaign Stats Report
* @param {string} campaignIds A comma-separated list of `campaign_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEmailStatsReport(campaignIds: string, options?: any): AxiosPromise {
return localVarFp.getEmailStatsReport(campaignIds, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
* @summary GET an Email Forwards Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getForwardsReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getForwardsReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact\'s email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
* @summary GET an Email Opt-outs Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getOptoutsReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getOptoutsReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
/**
* Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
* @summary GET an Email Unique Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUniqueOpensReport(campaignActivityId: string, limit?: string, options?: any): AxiosPromise {
return localVarFp.getUniqueOpensReport(campaignActivityId, limit, options).then((request) => request(axios, basePath));
},
};
};
/**
* EmailReportingApi - object-oriented interface
* @export
* @class EmailReportingApi
* @extends {BaseAPI}
*/
export class EmailReportingApi extends BaseAPI {
/**
* Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact\'s email address, unique ID, and the email bounce date and time. Use the bounce_code query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
* @summary GET an Email Bounces Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {Array} [bounceCode] To return results for a specific bounce code, select the `bounce_code` from the drop-down list. To return results for multiple codes, repeat the bounce code parameter for each. For example, to return results for bounce codes `B` and `D` use `bounce_code=B&bounce_code=D`.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getBouncesReport(campaignActivityId: string, bounceCode?: Array, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getBouncesReport(campaignActivityId, bounceCode, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
* @summary GET an Email Links Report
* @param {string} campaignActivityId The unique ID for an email campaign activity.
* @param {boolean} [noClicks] Set this query parameter to `true` to return details for links that were not clicked in the response results.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getCampaignActivityLinkReport(campaignActivityId: string, noClicks?: boolean, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getCampaignActivityLinkReport(campaignActivityId, noClicks, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
* @summary GET an Email Clicks Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {number} [urlId] The ID that uniquely identifies a single link URL for which you want to get a clicks report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getClicksReport(campaignActivityId: string, urlId?: number, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getClicksReport(campaignActivityId, urlId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
* @summary GET an Email Did Not Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getDidNotOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getDidNotOpensReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
* @summary GET an Email Campaign Activity Stats Report
* @param {string} campaignActivityIds A comma-separated list of `campaign_activity_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getEmailCampaignActivityReport(campaignActivityIds: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getEmailCampaignActivityReport(campaignActivityIds, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date). Use the limit query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see \"[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)\"
* @summary GET an Email Campaigns Summary Report
* @param {string} [limit] Use the `limit` query parameter to limit the number of email campaign summaries to return on a single page. The default is `50` and the maximum is `500` per page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getEmailCampaignReport(limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getEmailCampaignReport(limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
* @summary GET an Email Opens Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getEmailOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getEmailOpensReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact\'s email address, the contact\'s first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
* @summary GET an Email Sends Report
* @param {string} campaignActivityId The unique ID for an email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getEmailSendsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getEmailSendsReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
* @summary GET an Email Campaign Stats Report
* @param {string} campaignIds A comma-separated list of `campaign_id`s (UUID\'s).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getEmailStatsReport(campaignIds: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getEmailStatsReport(campaignIds, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact\'s email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
* @summary GET an Email Forwards Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getForwardsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getForwardsReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact\'s email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
* @summary GET an Email Opt-outs Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getOptoutsReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getOptoutsReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
/**
* Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact\'s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
* @summary GET an Email Unique Opens Report
* @param {string} campaignActivityId The ID that uniquely identifies the email campaign activity to use for this report.
* @param {string} [limit] The number of tracking activities to return on a page.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailReportingApi
*/
public getUniqueOpensReport(campaignActivityId: string, limit?: string, options?: RawAxiosRequestConfig) {
return EmailReportingApiFp(this.configuration).getUniqueOpensReport(campaignActivityId, limit, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* @export
*/
export const GetBouncesReportBounceCodeEnum = {
B: 'B',
D: 'D',
F: 'F',
S: 'S',
V: 'V',
X: 'X',
Z: 'Z'
} as const;
export type GetBouncesReportBounceCodeEnum = typeof GetBouncesReportBounceCodeEnum[keyof typeof GetBouncesReportBounceCodeEnum];