Brands - Segments



Endpoint

GET /v1.1/brand/[BrandID]/segments

Description

Parameters
required *

apiKey *  string Your API access key
[brandID]  integer Filter to segments for a specific brand
segmentID  integer ID of the campaign to filter by
orderBy  string Order the results. Accepts the arguments CREATED or ID, plus ASC and DESC eg. orderBy=CREATED+DESC
excludeBasicSocial  boolean Set to 1 to exclude your default Basic Social Listening segment
withActivities  boolean Set to 1 to show all activities within this segment

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/segments?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p"
$curl = curl_init();

curl_setopt_array($curl, array( 
	CURLOPT_URL => "https://api.theappreciationengine.com/v1.1/brand/1234/segments?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/segments?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/segments?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p',
	'headers': {}
};
request(options, function (error, response) {
	if (error) throw new Error(error);
	console.log(response.body);
});

Example Response

[
{
"Name": "Basic Social Listening",
"ID": "12345",
"Blurb": "Measure member behaviour around basic brand signals",
"URL": null,
"Created": "2355-05-04 13:00:00",
"Active": "1",
"BrandName": "Starfleet",
"BrandID": "11111"
},
{
"Name": "Launch of USS Enterprise",
"ID": "67890",
"Blurb": "Track a custom activity",
"URL": null,
"Created": "2359-05-04 13:00:00",
"Active": "1",
"BrandName": "Starfleet",
"BrandID": "11111"
}
]