Developers

Example Usage of

campaign_report_forward_totals

Obtain forward totals for a specific campaign.

Description:

Obtain a total of all forwards for a specific campaign. This only returns the total amount of forwards, much like is seen along the top on the Campaign Reports page. To view individual forwarded email addresses, use campaign_report_forward_list.

Endpoint:

/admin/api.php?api_action=campaign_report_forward_totals

HTTP method:

GET

Supported output formats:

xml, json, serialize

Requires authentication:

true

Parameters:

* indicates requirement. Underlined params include in URL, otherwise as part of the post body. POST data must be formatted as

Content-Type: application/x-www-form-urlencoded

. We don't accept any other input formats like JSON.

Variable

Description

api_action*

campaign_report_forward_totals

api_key*

Your API key

api_output

xml, json, or serialize (default is XML)

campaignid*

ID of the campaign you wish to see forwards for

Example response:

Variable

Description

forwards

Total number of forwards for this campaign. Example: 1

uniqueforwards

Total number of unique forwards for this campaign. Example: 2

didntforward

Total number of contacts who did not forward this campaign. Example: 2

avgforwards

An average of contacts who forwarded, versus those that did not. Example: 0.5000

result_code

Whether or not the response was successful. Examples: 1 = yes, 0 = no

result_message

A custom message that appears explaining what happened. Example: Something is returned

result_output

The result output used. Example: serialize

PHP Example

This is an example of using the campaign_report_forward_totals call with PHP.
You can replicate the same idea in virtually any other programming language.
The example shown is using serialize as the output format.
You can change that to XML or JSON if you would like.