User Activity History – Extended


Request Details

Item Value
Description Returns the list of activities a user has completed.
Method GET
Endpoint https://api.crowdtwist.com/v2/users/[user_id]/activity_history/extended?api_key=[api_key]&id_type=[id_type]


Request

Field Name Sample Value Required Format Notes
URL PARAMETERS
user_id alice@crowdtwist.com Yes String Unique ID of the user for whom activities will be returned:
Options:
– Email Address
– Facebook User ID
– Twitter User ID
– CrowdTwist ID
– Third Party ID
– Username
– Mobile Phone Number
QUERY STRING PARAMETERS
api_key QWERTYUIOP Yes String  
id_type email No String Type of ID being Sent:
Options:
– Email Address
– Facebook_user_id
– twitter_user_id
– Id (CrowdTwist ID) – default ID if id_type is not specified
– Third_party_id
– username
– mobile_phone_number
page_size 10 No Integer If using pagination in request, the number of items per page.
Note: if used, must be used with page_number
page_number 1 No Integer If using pagination in request, the page number to be returned.
Note: if used, must be used with page_size


Successful Response

Field Name Sample Value Required Format Description
id 64 Yes   Internal CrowdTwist Activity ID
name watched a video Yes   The name of the activity
title Watched A Video Yes   The title of the activity
description Watched A Video Yes   The description of the activity
date_created 1425404945 Yes String Date activity was recorded.
num_points 25 Yes   The number of points an activity is worth
image https://crowdtwist.com/img/v2/image.jpg Yes   The URL to the activity image
category_id 3 Yes   An internal CrowdTwist Category ID that corresponds to the category_name; 1-4
category_name Interact Yes   The name of the category assigned to the activity
  1 = Share
  2 = Socialize
  3 = Interact
  4 = Buy
type_id 7 Yes   An internal CrowdTwist Type ID that corresponds to the type_id; 1-8
type_name Your Site Yes   The type of activity
  1 = Facebook
  2 = Merchandise
  3 = Music
  4 = Tickets
  5 = Twitter
  6 = Your Site
  7 = Check-In
  8 = Code Redemption
activity_channel_id null no   Internal Activity Channel ID that corresponds to activity channel
name; 1-26
activity_channel_name null no   Activity Channel
  1 = ad hoc points
  2 = code redemption cgp
  3 = code redemption other
  4 = content creation and share
  5 = content download
  6 = donation
  7 = email open or click
  8 = email sent from member via program
  9 = facebook
  10 = foursquare
  11 = game played
  12 = Instagram
  13 = Mobile client app
  14 = Mobile partner app
  15 = Program login
  16 = Purchase merchandise
  17 = Purchase season ticket or subscription
  18 = Purchase ticket
  19 = Registration and profile
  20 = Reward redemption
  21 = Survey
  22 = Sweeps
  23 = Twitter
  24 = Web client site activity
  25 = Web other site activity
  26 = Web partner site activity
freq_cap 1 Yes   The number of times a member can complete an activity
freq_period_id 2 Yes   The internal frequency period id; 1-9
freq_period_name One Calendar Day Yes   The period of time before members can re-earn points for
completing the activity.
  1 = 24 Hours (Inactive)
  2 = One Calendar Day
  3 = Seven Calendar Days (Inactive)
  4 = One Calendar Week
  5 = Lifetime
  6 = One Calendar Month
  7 = One Calendar Year (Inactive)
  8 = 365 Days (Inactive)
  9 = 30 Days (Inactive)
freq_num_required_attempts null No   The number of times the activity must completed before points are awarded
redirect_url www.crowdtwist.com No   Redirect URL that the member is taken to when selecting on certain the activity titles (e.g. point-on-click; JS Tag)
points_on_click true Yes   Denotes whether an activity is a point on click
action_tags null No   The JavaScript tag that is used to award points for activities that are tracked via JS Tag
extra_data null No    
public_title Watch A Video Yes   The member-facing title of the activity
public_description Daily Points for every video! Yes   The member-facing description of the activity


Error Response

Field Name Sample Value Required Format Description
error param_error Yes String A machine readable code that describes the error.
message User does not exist Yes String A short, descriptive sentence detailing the error.


Error Response Codes

Error Message
param_error A missing or invalid parameter is included in the request.
invalid_auth Invalid access credentials.
no data There are no activities available to this client.
internal_error Something went wrong on our end


Sample Request

curl -X GET
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/activity_history/extended?api_key=QWERTYUIOP&id_type=email
curl -X GET
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/activity_history/extended?api_key=QWERTYUIOP&id_type=email


Sample Successful Response: Status Code 200

[
  {
    "activity_id": "410045341",
    "name": "expired points",
    "title": "Expired Points",
    "description": "Expired Points",
    "num_points": 0,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "category_name": "Interact",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1476259200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Expired Points",
    "public_description": null
  },
  {
    "activity_id": "410045341",
    "name": "expired points",
    "title": "Expired Points",
    "description": "Expired Points",
    "num_points": -3000,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "category_name": "Interact",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1468483200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Expired Points",
    "public_description": null
  },
  {
    "activity_id": "215",
    "name": "rewards redeemed",
    "title": "Rewards Redeemed",
    "description": "Rewards Redeemed",
    "num_points": 0,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/6a3bcf37640aad552f7bdc256f04898145886575/100/100/0/image.jpg",
    "category_id": null,
    "category_name": null,
    "type_id": null,
    "type_name": null,
    "activity_channel_id": "20",
    "activity_channel_name": "reward redemption",
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Rewards Redeemed",
    "public_description": "<strong>You did it!  Now it's time to enjoy your rewards.</strong>  A confirmation email will be sent to you at %EMAIL_ADDRESS%.."
  },
  {
    "activity_id": "194",
    "name": "user registration",
    "title": "User Registration",
    "description": "User Registration",
    "num_points": 1000,
    "base_num_points": "1000",
    "image": "https://cdn.crowdtwist.com/img/v2/72bdf7987740c5a916f9aa20e168f1eaa1793377/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": {
      "ABC": "123"
    },
    "public_title": "User Registration",
    "public_description": "Sign up, earn points, get rewards"
  },
  {
    "activity_id": "199",
    "name": "mobile phone added",
    "title": "Mobile Phone Added",
    "description": "Mobile Phone Added",
    "num_points": 1000,
    "base_num_points": "1000",
    "image": "https://cdn.crowdtwist.com/img/v2/34ad4f7dc9b0e9ce150c058ba5ea82e22a3e3c1b/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": "19",
    "activity_channel_name": "registration and profile",
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Add Your Phone Number",
    "public_description": "Get points for updating your profile"
  },
  {
    "activity_id": "203",
    "name": "joined email list",
    "title": "Joined Email List",
    "description": "Joined Email List",
    "num_points": 1000,
    "base_num_points": "10",
    "image": "https://cdn.crowdtwist.com/img/v2/f8ddf8331a70fbf77fad39a9dc316b9dbda22b9a/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Join Email List",
    "public_description": "Get points for subscribing to Rewards"
  }
]
[
  {
    "activity_id": "410045341",
    "name": "expired points",
    "title": "Expired Points",
    "description": "Expired Points",
    "num_points": 0,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "category_name": "Interact",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1476259200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Expired Points",
    "public_description": null
  },
  {
    "activity_id": "410045341",
    "name": "expired points",
    "title": "Expired Points",
    "description": "Expired Points",
    "num_points": -3000,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "category_name": "Interact",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1468483200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Expired Points",
    "public_description": null
  },
  {
    "activity_id": "215",
    "name": "rewards redeemed",
    "title": "Rewards Redeemed",
    "description": "Rewards Redeemed",
    "num_points": 0,
    "base_num_points": "0",
    "image": "https://cdn.crowdtwist.com/img/v2/6a3bcf37640aad552f7bdc256f04898145886575/100/100/0/image.jpg",
    "category_id": null,
    "category_name": null,
    "type_id": null,
    "type_name": null,
    "activity_channel_id": "20",
    "activity_channel_name": "reward redemption",
    "freq_cap": null,
    "freq_period_id": null,
    "freq_period_name": null,
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Rewards Redeemed",
    "public_description": "<strong>You did it!  Now it's time to enjoy your rewards.</strong>  A confirmation email will be sent to you at %EMAIL_ADDRESS%.."
  },
  {
    "activity_id": "194",
    "name": "user registration",
    "title": "User Registration",
    "description": "User Registration",
    "num_points": 1000,
    "base_num_points": "1000",
    "image": "https://cdn.crowdtwist.com/img/v2/72bdf7987740c5a916f9aa20e168f1eaa1793377/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": {
      "ABC": "123"
    },
    "public_title": "User Registration",
    "public_description": "Sign up, earn points, get rewards"
  },
  {
    "activity_id": "199",
    "name": "mobile phone added",
    "title": "Mobile Phone Added",
    "description": "Mobile Phone Added",
    "num_points": 1000,
    "base_num_points": "1000",
    "image": "https://cdn.crowdtwist.com/img/v2/34ad4f7dc9b0e9ce150c058ba5ea82e22a3e3c1b/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": "19",
    "activity_channel_name": "registration and profile",
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Add Your Phone Number",
    "public_description": "Get points for updating your profile"
  },
  {
    "activity_id": "203",
    "name": "joined email list",
    "title": "Joined Email List",
    "description": "Joined Email List",
    "num_points": 1000,
    "base_num_points": "10",
    "image": "https://cdn.crowdtwist.com/img/v2/f8ddf8331a70fbf77fad39a9dc316b9dbda22b9a/100/100/0/image.jpg",
    "category_id": "1",
    "category_name": "Share",
    "type_id": "7",
    "type_name": "Your Site",
    "activity_channel_id": null,
    "activity_channel_name": null,
    "freq_cap": "1",
    "freq_period_id": "5",
    "freq_period_name": "Lifetime",
    "freq_num_required_attempts": null,
    "redirect_url": null,
    "points_on_click": false,
    "action_tags": null,
    "date_created": 1460707200,
    "extra_data": null,
    "base_extra_data": null,
    "public_title": "Join Email List",
    "public_description": "Get points for subscribing to Rewards"
  }
]

Sample Error Response: Status Code 400

{
  "error": "param_error",
  "message": "Missing the username parameter."
}
{
	"error": "param_error",
	"message": "Missing the username parameter."
}