API - Activity Data Overview

Activities represent the interaction of supporters with published forms.  At this time, supporters can interact with the following types of forms:

 

ActivityDescription
SUBSCRIPTION_MANAGEMENT

Make changes to email interests as well as globally opting out

SUBSCRIBE Signup to become a supporter of your organization
FUNDRAISE Make a donation to your organization
PETITION Sign a petition to show their support for your organization's cause
TARGETED_LETTER Send a letter to political leaders within their district
TICKETED_EVENT Attend an event, or donate to the cause of an event

 

Acquiring Activities

Activities can be acquired from Salsa Engage in one of two ways

  1. By providing a list of existing activity UUIDS
  2. By providing a date range which to search.  In addition a specific type or types of activity can be included within the request

Both the number of items provided and the number of items requested will count towards the rate limit for the token.

The end point to invoke for searching activities is:

POST  /api/integration/ext/v1/activities/search

  • include your API token as a HTTP header parameter named: authToken
  • include your search criteria within the body of the request as well formatted JSON

 

Request Body Format

{

  "header" :{"refId":"optionalId"}, 

  "payload":{
         "modifiedFrom":"2016-05-26T11:49:24.905Z",
         "type":"SUBSCRIPTION_MANAGEMENT",
         "offset":0,
         "count":20}

}

 

 

ParameterLocationDescription
refId header An optional value that can be provided by the caller as a correlation Id. This value will be returned in the header or the response payload.
activityIds payload List of activity ids to retrieve - 36 character UUID
note that the modifiedFrom and modifiedTo parameters can not be provided when activity ids are provided 
modifiedFrom payload Date from to retrieve activities - ISO_8601 formatted String with a GMT timezone
modifiedTo payload Date to retrieve activities - ISO_8601 formatted String with a GMT timezone
offset payload Starting count at which to retrieve activities - supports pagination and is only applicable when modifiedFrom and modifiedTo searching is used
count payload Number of activities to retrieve - supports pagination and is only applicable when modifiedFrom and modifiedTo searching is used
type payload

The types of activities to search for - this is an optional parameter that is only applicable for retrieving activities using the modifiedFrom and modifiedTo parameters.

Value must be one of the following if provided:

  • SUBSCRIPTION_MANAGEMENT
  • SUBSCRIBE
  • FUNDRAISE
  • PETITION
  • TARGETED_LETTER
  • TICKETED_EVENT

 

Request Example

DescriptionBody
Get any activities since a specific date
{"payload":{
"modifiedFrom":"2016-05-26T11:49:24.905Z",
"offset":0,
"count":20}
}
Get specific activities since a specific date
{"payload":{
"modifiedFrom":"2016-05-26T11:49:24.905Z",
"type":"SUBSCRIPTION_MANAGEMENT",
"offset":0,
"count":20}
}
Get activities within a date range
{"payload":{
"modifiedFrom":"2016-04-26T11:49:24.905Z",
"modifiedTo":"2016-05-26T11:49:24.905Z",
"offset":0,
"count":20}
}
Get specific activities by id
{"payload":{
"activityIds":[
 "0B99B409-E56D-4530-A226-474C61461DB4",
"7EEEED4B-40A4-4FCE-B107-AE643AD1D926",
"9AC97182-671C-4364-B69A-1298A8C6D83D"]}
}

 

Response Body Format

The response body format is as follows.  All results, regardless of types will have the following information. Details for each activity type as well as these fields can be found detail sections of this document. 

Example Response:

{
 "header":{
    "processingTime":196,
    "serverId":"127.0.0.1"},
    "payload":{
         "total":1,
         "offset":0,
         "count":1,
         "activities":[
                {"activityType":"SUBSCRIBE",
                 "activityId":"ae41ff3a-3820-4085-9c90-5a0154ccd624",
                 "activityFormName": "Activity Name",
                 "activityFormId":"8ec2afb6-bc8a-4214-be62-6d1035f4fe75",
                 "supporterId":"85289038-7880-4a55-8f42-15741899284e",
                 "activityDate":"2016-05-26T11:49:24.913Z",
                 "activityType":"SUBSCRIPTION_MANAGEMENT",
                 "lastModified":"2016-05-26T11:49:24.916Z"}],
         }
}
Have more questions? Submit a request
Powered by Zendesk