API Guide







Get Analytics Campaign

This API provides detailed view of campaign activity including clients, devices, engagement, geolocation, etc.

Required headers: X-API-KEY
Optional headers: ACCEPT (json, xml, csv, serialized)
Method: GET

Endpoint URL:

https://api.250ok.com/api/1.0/analytics/campaign

Sample Output:

{  
    "campaign":{  
        "campaign_id":001,
        "subject":"10% off sale",
        "created":"2015-09-08 10:05:12",
        "first_tracked":"2015-09-08 14:08:23"
    },
    "activity":{  
        "open":211461,
        "open_unique":189255,
        "forward":63,
        "print":16
    },
    "engagement":{  
        "read":94259,
        "skimmed":32550,
        "glancedorunread":12763
    },
    "devices":[  
        {  
            "name":"Windows",
            "count":54232,
            "versions":[  
                {  
                    "version":7,
                    "name":"Windows 7",
                    "count":28563
                }...
            ]
         
        },
        {  
            "name":"iPhone",
            "count":42547,
            "versions":[  
                {  
                    "version":10,
                    "name":"iPhone 10",
                    "count":38835
                }...
            ]
        }...
    ],
    "clients":[
        {  
            "name":"Apple Mail",
            "count":54633,
            "versions":[  
                {  
                    "version":10,
                    "name":"Apple Mail 10",
                    "count":45896
                }...
            ]
        },
        {  
            "name":"Chrome",
            "count":34788,
            "versions":[  
                {  
                    "version":58,
                    "name":"Chrome 58",
                    "count":14839
                }...
            ]
        }...
    ],
    "platforms":{  
        "Desktop":62176,
        "Tablet":5270,
        "Mobile Phone":70404
    },
    "geolocation":[  
        {  
            "name":"Brazil",
            "abbreviation":"BR",
            "count":266652,
            "regions":[  
                {  
                    "name":"S\u00e3o Paulo",
                    "count":112502,
                    "latitude":-23.550499,
                    "longitude":-46.633297
                }...
            ]
        },
        {  
            "name":"United States",
            "abbreviation":"US",
            "count":3476,
            "regions":[  
                {  
                    "name":"District of Columbia",
                    "count":452,
                    "latitude":38.9072,
                    "longitude":-77.036896
                }...
            ]
        }...
    ],
    "providers":[  
        {  
            "name":"Gmail",
            "count":90847
        },
        {  
            "name":"Hotmail",
            "count":51214
        }...
    ]
}

Parameters

Parameter Description Acceptable Values Required
id The Analytics campaign identifier (campaign_id) returned from Get Campaigns Integer Y
include A pipe-delimited list of campaign statistics. The campaign and activity objects are returned by default. To return all objects, use this example: include=devices|clients|platforms|geolcation|providers String N

Error Responses

Description Code Cause
You must specify a campaign ID. 404 A campaign ID was not detected in the request.
Invalid campaign ID. 404 The campaign ID parameter must be numeric.
No results found. 404 We couldn't find any results matching your criteria.