* This is an advanced endpoint. To use, please make sure your plan has advanced access.
Manually record an activity for your data feed. Requires a pre-existing activity with ID to be created and saved in AE dashboard.
Make this call to API whenever the action has taken place in another system. For example you might insert the API call on a form submission event, or you might call a function via AJAX on a button click.
WARNING: This is a POST request and may add data to your feed when testing.
string |
Your API access key | |
integer |
The ID of the activity as it appears in your dashboard | |
integer |
The ID of the user to record the activity for. Instead of id, you may provide partnerId/partnerCode combination | |
integer |
The ID of the specific brand for this activity | |
content | string |
Any content you want to record against the activity (eg. any message entered by the user as part of the activity) |
link | string |
Any url associated with the activity (eg. a link to the completed activity record) |
marker | string |
An optional unique identifier to ensure the activity can't be repeated with exactly the same information |
timestamp | string |
An optional timestamp to record against the completed activity (if not supplied, the Appreciation Engine will default to the time we receive the api call) |
async | boolean |
Value of 0 or 1. Default is 1. 0 = save to data views immediately. 1 = queue for next view refresh. Asynchronous calls provide better performance, but delays availability of data retrieval. |
Sign in with your developer account to use the console, or sign up here
curl -X POST "https://api.theappreciationengine.com/v1.1/activity/record?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&activityid=4327&id=123456&brandid=1234"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.theappreciationengine.com/v1.1/activity/record?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&activityid=4327&id=123456&brandid=1234",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.theappreciationengine.com/v1.1/activity/record?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&activityid=4327&id=123456&brandid=1234"
headers = {}
payload = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text.encode('utf8'))
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.theappreciationengine.com/v1.1/activity/record?apiKey=0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p&activityid=4327&id=123456&brandid=1234',
'headers': {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
[{
"status": "OK"
}]