366 Degrees

366 Web API

Activities Details List

Get Activities From Activity Stream

Description: This will return a list of all activities (from 366 Degrees Activity Stream) for the specified email address.
Method: GetActivitiesList
URL: https://stage2api.366.io/Activitiesapi/api/Activities/GetActivitiesList?email=testc2@mailinator.com
 

Try it out

Activity Details Information

Sample Code

C# Code

public List GetActivitiesList(string App_Key, string App_Secret, string Contact_Email)
{
var request = new RestRequest("/api/Activities/GetActivitiesList?email=" + Contact_Email, Method.GET) { RequestFormat = DataFormat.Json };
request.AddHeader("App_Key", App_Key);
request.AddHeader("App_Secret", App_Secret);
IRestResponse response = client.Execute(request);
var content = response.Content;
content = content.TrimStart('\"');
content = content.TrimEnd('\"');
content = content.Replace("\\", "");
var result = JsonConvert.DeserializeObject>(content);
return result;
}

JQuery Code

function getAllActivities()
{ jQuery.support.cors = true;
var emailid = $('#txtContactEmail').val();
var appkey = $('#txtAppKey').val();
var appsecret = $('#txtAppSecret').val();
if (appkey == '' & appsecret == '' & emailid == '')
{
alert("Please provide the values for 'App Key','App Secret', 'Contact Email'");
return false;
} else {
$.ajax({
url: 'http://Dev.366.io/366ContactLeadAPI/api/Activities/GetActivitiesList?email=' + emailid,
type: 'GET',
contentType: "application/json; charset=utf-8",
headers: { 'App_Key': appkey, 'App_Secret': appsecret},
success: function (data)
{
debugger;
alert(data);
},
error: function ()
{
alert('error');
}
});
}
}

Json Output

"[
{
\"Customer_Id\":\"\",
\"Customer_FisrstName\":\"Krishnam\",
\"Customer_LastName\":\"Raju\",
\"Customer_Email\":\"svkr23@mailinator.com\",
\"Customer_Type\":\"Lead\",
\"Customer_Status\":\"Active\",
\"Activity_Type\":\"Page\",
\"Client_Id\":\"0\",
\"Partner_Id\":\"0\",
\"Activity_Status\":\"Subscribed\",
\"Activity_Date\":\"2016-06-22T12:24:35\",
\"Activity_Description\":\"Inactive subsription in email Audience- Subscribed\",
\"Activity_Name\":\"Inactive subsription in email Audience\",
\"Created_By\":null,
\"App_Secret\":null,
\"App_Key\":null,
\"Asset_Type\":null,
\"Asset_Id\":\"0\",
\"eMail_Status\":null,
\"CampaignSchedule_Id\":null
},
{
\"Customer_Id\":\"\",
\"Customer_FisrstName\":\"Krishnam\",
\"Customer_LastName\":\"Raju\",
\"Customer_Email\":\"svkr23@mailinator.com\",
\"Customer_Type\":\"Lead\",
\"Customer_Status\":\"Active\",
\"Activity_Type\":\"Profile\",
\"Client_Id\":\"0\",
\"Partner_Id\":\"0\",
\"Activity_Status\":\"Created\",
\"Activity_Date\":\"2016-06-22T12:24:35\",
\"Activity_Description\":\"Profile- Created\",
\"Activity_Name\":\"Profile\",
\"Created_By\":null,
\"App_Secret\":null,
\"App_Key\":null,
\"Asset_Type\":null,
\"Asset_Id\":\"0\",
\"eMail_Status\":null,
\"CampaignSchedule_Id\":null
}
]"