Comparison Report

This service is for listing, creating and alteration of standard comparison reports.


fetchAll

array comparison_report.fetchAll( )

Requests a list of comparison reports. This method has no parameters to specify as it will request all comparison reports regardless of the position within the folder hierarchy.

Return Values

Returns an array of associative arrays. For the possible returned elements see #find.



find

array comparison_report.find( int reportId )

Requests the details of the single comparison report requested.

Parameters

reportId

ID of the comparison report you're requesting.

Return Values

Returns an associative array. The possible returned elements are as follows:

Name

Type

Description

report_id

int

Comparison Report Id

folder_id

int

Folder Id

name

string

Name of the comparison report

folders

string

Comma-separated list of folder IDs included in the report

campaigns

string

Comma-separated list of campaign IDs included in the report

emails

string

Comma-separated list of email IDs included in the report

order_by

array

The sort order of the emails in the report. See #order_by

update_ts

timestamp

Date and time the list was last updated

order_by

Associative array to control the sort order of the emails included in the report:

Key

Type

Value

field

string

Name of the sort field

direction

string

'ASC' or 'DESC'



insert

int comparison_report.insert( array data )

Inserts a new comparison report into the current customer space.

Parameters

data

The keys that can be set are similar to those returned by #find. The report_id and update_ts cannot be changed, and the various node types are set by array. All keys are optional:

Name

Required

Type

Description

folder_id

Yes

int

Add the comparison report to this folder

name

Yes

string

Name of the comparison report

folders


array

Indexed array folder IDs included in the report

campaigns


array

Indexed array of campaign IDs included in the report

emails


array

Indexed array of email IDs included in the report

order_by


array

The sort order of the emails in the report. See #order_by

Return Values

Returns an int type. The Id of the newly created comparison report.



update

bool comparison_report.update( int reportId, array data )

Updates an existing comparison report using the data specified.

Parameters

reportId

ID of the comparison report you want to update.

data

See #insert for the elements that can be written. All keys are optional. The comparison report can be moved by specifying a new folder_id.

Return Values

Returns a bool. True on success.



delete

bool comparison_report.delete( int reportId )

Deletes the specified comparison report.

Parameters

reportId

ID of the comparison report you want to delete.

Return Values

Returns true on success, false on failure.



copy

int comparison_report.copy( int reportId, string name, int folderId )

Updates an existing comparison report using the data specified.

Parameters

reportId

ID of the comparison report you want to copy.

name

Name for the new comparison report. Must be unique within a folder.

folderId

ID of the folder in which to create the copy.

Return Values

Returns an int type. The Id of the newly created comparison report.



exportReport

array comparison_report.exportReport( int reportId, string type )

Generates a report from the comparison report, which can then be downloaded.

Parameters

reportId

ID of the comparison report.

type

The report type to be generated.

Value

Description

pdf

A multipage report in PDF format, containing items as seen in the user interface

Return Values

Returns the file download key.

The report can then be downloaded by using the following URL:

https://<server>/download/file/key/<key>

Where:

Placeholder

Value

server

Hostname of your server

key

The file download key returned

Service

comparison_report

Methods