getImpressionsInfo

Description

Get detailed impressions info for mailing lists.



Params

Name Type Description
apiKey string API key previously generated
id integer Optional parameter if you want to get stats for a single mailing list. If not set, will return for all mailing lists.
startDate string Optional parameter for start date. Must be in the following format: YYYY-MM-DD HH:MM:SS.
endDate string Optional parameter for end date. Must be in the following format: YYYY-MM-DD HH:MM:SS.
smtpTags array Optional parameter to search for impressions with specific smtp tags. You must be provide an array of smtp tags ids.

 

Returned data

Type: array

Description: Return array with impressions data.

 

Json sample code

<?php

$curl = curl_init('https://your_address/ccm/admin/api/version/2/&type=json');

$postData = array(
    'function' => 'getImpressionsInfo',
    'apiKey' => 'apiKey',
);

curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$json = curl_exec($curl);
if ($json === false) {
    die('Request failed with error: '. curl_error($curl));
}

$result = json_decode($json);
if ($result->status == 0) {
    die('Bad status returned. Error: '. $result->error);
}

var_dump($result->data);

 

Result of API call

Array
(
    [0] => stdClass Object
        (
            [date] => 2012-02-16 17:14:56
            [email] => demo@mail.com
            [browser] => Chrome 19.0.1041.0
            [os] => Windows
            [lat] => 40
            [lng] => -4
            [location] =>  - 
        )

    [1] => stdClass Object
        (
            [date] => 2012-02-16 17:14:54
            [email] => demo@mail.com
            [browser] => Chrome 19.0.1041.0
            [os] => Windows
            [lat] => 40
            [lng] => -4
            [location] =>  - 
        )

    [2] => stdClass Object
        (
            [date] => 2012-02-16 15:53:21
            [email] => demo@mail.com
            [browser] => iPhone unknown
            [os] => iPhone
            [lat] => 40
            [lng] => -4
            [location] =>  - 
        )

    [3] => stdClass Object
        (
            [date] => 2012-02-16 15:53:16
            [email] => demo@mail.com
            [browser] => iPhone unknown
            [os] => iPhone
            [lat] => 40
            [lng] => -4
            [location] =>  - 
        )

    [4] => stdClass Object
        (
            [date] => 2012-02-16 15:53:11
            [email] => demo@mail.com
            [browser] => iPhone unknown
            [os] => iPhone
            [lat] => 40
            [lng] => -4
            [location] =>  - 
        )

    [5] => stdClass Object
        (
            [date] => 2012-02-16 15:52:13
            [email] => demo@mail.com
            [browser] => Firefox 10.0.1
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [6] => stdClass Object
        (
            [date] => 2012-02-16 15:52:06
            [email] => demo@mail.com
            [browser] => Firefox 10.0.1
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [7] => stdClass Object
        (
            [date] => 2012-02-13 16:06:15
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [8] => stdClass Object
        (
            [date] => 2012-02-13 13:20:01
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [9] => stdClass Object
        (
            [date] => 2012-02-13 11:21:28
            [email] => demo@mail.com
            [browser] => Chrome 16.0.912.77
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [10] => stdClass Object
        (
            [date] => 2012-02-13 11:21:20
            [email] => demo@mail.com
            [browser] => Chrome 16.0.912.77
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [11] => stdClass Object
        (
            [date] => 2012-02-13 11:21:01
            [email] => demo@mail.com
            [browser] => Chrome 16.0.912.77
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [12] => stdClass Object
        (
            [date] => 2012-02-13 11:15:51
            [email] => demo@mail.com
            [browser] => Internet Explorer 9.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [13] => stdClass Object
        (
            [date] => 2012-02-13 11:14:33
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [14] => stdClass Object
        (
            [date] => 2012-02-13 11:14:28
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [15] => stdClass Object
        (
            [date] => 2012-02-13 11:13:37
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [16] => stdClass Object
        (
            [date] => 2012-02-13 10:53:23
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [17] => stdClass Object
        (
            [date] => 2012-02-13 10:53:20
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [18] => stdClass Object
        (
            [date] => 2012-02-13 10:53:17
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [19] => stdClass Object
        (
            [date] => 2012-02-13 10:52:38
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [20] => stdClass Object
        (
            [date] => 2012-02-07 10:15:06
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [21] => stdClass Object
        (
            [date] => 2012-02-07 10:05:51
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [22] => stdClass Object
        (
            [date] => 2012-02-07 09:56:41
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [23] => stdClass Object
        (
            [date] => 2012-02-07 09:55:38
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [24] => stdClass Object
        (
            [date] => 2012-02-07 09:49:16
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [25] => stdClass Object
        (
            [date] => 2012-02-01 12:03:15
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [26] => stdClass Object
        (
            [date] => 2012-02-01 11:50:50
            [email] => demo@mail.com
            [browser] => Firefox 10.0
            [os] => Windows
            [lat] => 39.4000015259
            [lng] => -0.40000000596
            [location] => Catarroja - Comunidad Valenciana
        )

    [27] => stdClass Object
        (
            [date] => 2012-01-02 15:59:10
            [email] => demo@mail.com
            [browser] => Chrome 16.0.912.63
            [os] => Windows
            [lat] => 40.4000015259
            [lng] => -3.68330001831
            [location] => Madrid - Madrid
        )

)
Menu Title