Brands - Activity Breakdown Timeline



Endpoint

GET /v1.1/brand/[BrandID]/stats/timeline

Description

Parameters
required *

apiKey *  string Your API access key
[brandID]  integer Filter to user actions and score for a specific brand
segment  integer Filter activity to those defined in specified segment (ID)
members_from_segment  integer Filter activity to members from specified segment (ID)
activityID  integer ID of activity to filter by – determines scores & position. Accepts either a number (e.g. 123) or a comma-separated list (e.g. 123,678)
period  string In format of '[Amount] [Unit]' - eg 2 Month, 1 Day, 3 Week (default: 1 Week)
period_end  string In format of '[Amount] [Unit]' - eg 2 Month, 1 Day, 3 Week (default: 1 Week)
start_date  string In format of 'YYYY-MM-DD HH:MM:SS' – start of date range for results
end_date  string In format of 'YYYY-MM-DD HH:MM:SS' – end of date range for results
includeOneTime  boolean Set to 1 to include one time actions such as follows and likes in totals (default 0)
services  string Only display breakdowns by these services. Comma separated list – eg. twitter, facebook, lastfm, rdio, youtube, custom, etc
members  string Only include these members, comma separated list of member IDs – eg. 811566,803186
exclude_members  string Ignore these members, comma separated list of member IDs – eg. 811566,803186
optedin  boolean Value of 1 will only show members who have been opted into this campaign (via optin endpoint call)
paid_only  boolean Filter to users who have a paid service attached eg. Spotify Premium

Sign in with your developer account to use the console, or sign up here

Example Request

curl -v -X GET "https://api.theappreciationengine.com/v1.1/brand/1234/stats/timeline?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p"
$curl = curl_init();

curl_setopt_array($curl, array( 
	CURLOPT_URL => "https://api.theappreciationengine.com/v1.1/brand/1234/stats/timeline?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p", 
	CURLOPT_RETURNTRANSFER => true, 
	CURLOPT_ENCODING => "", 
	CURLOPT_MAXREDIRS => 10, 
	CURLOPT_TIMEOUT => 0, 
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 
	CURLOPT_CUSTOMREQUEST => "GET", 
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.theappreciationengine.com/v1.1/brand/1234/stats/timeline?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p"

headers = {}
payload = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
var request = require('request');
var options = {
	'method': 'GET',
	'url': 'https://api.theappreciationengine.com/v1.1/brand/1234/stats/timeline?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p',
	'headers': {}
};
request(options, function (error, response) {
	if (error) throw new Error(error);
	console.log(response.body);
});

Example Response

[{
"services": [ {
"service": "twitter",
"range": [ {
"Date": "2020-04-25 00:09:00",
"DayofYear": "116",
"Count": "88",
"DistinctMembers": "59"
},
{
"Date": "2020-04-26 06:00:00",
"DayofYear": "117",
"Count": "108",
"DistinctMembers": "67"
},
{
"Date": "2020-04-27 00:09:00",
"DayofYear": "118",
"Count": "113",
"DistinctMembers": "80"
},
{
"Date": "2020-04-28 01:00:00",
"DayofYear": "119",
"Count": "74",
"DistinctMembers": "47"
},
{
"Date": "2020-04-29 12:00:00",
"DayofYear": "120",
"Count": "75",
"DistinctMembers": "53"
},
{
"Date": "2020-04-30 01:00:00",
"DayofYear": "121",
"Count": "70",
"DistinctMembers": "41"
} ], "TotalCount": 528, "TotalMembers": 347
} ]
}]