User Activity Search – Extended


Request Details

Item Value
Description Returns the details of a specific activity for a user.
Method GET
Endpoint https://api.crowdtwist.com/v2/users/[user_id]/activities/[activity_id]/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
activity_id 123456 Yes String CrowdTwist generated activity ID


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
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/activities/123456/extended?api_key=QWERTYUIOP&id_type=email
curl -X GET
https://api.crowdtwist.com/v2/users/alice@crowdtwist.com/activities/123456/extended?api_key=QWERTYUIOP&id_type=email


Sample Successful Response: Status Code 200

{
  "id": 123456,
  "name": "read news",
  "title": "read news",
  "description": "Read news",
  "num_points": 123,
  "image": "https://cdn.crowdtwist.com/img/v2/7d1625e2cdde97c382a873c5c496984500d66a96/100/100/0/image.jpg",
  "category_id": "1",
  "category_name": "Share",
  "type_id": "1",
  "type_name": "Facebook",
  "activity_channel_id": null,
  "activity_channel_name": null,
  "freq_cap": "1",
  "freq_period_id": "2",
  "freq_period_name": "One calendar day",
  "freq_num_required_attempts": null,
  "redirect_url": null,
  "points_on_click": false,
  "action_tags": "ct_trck_news",
  "extra_data": null,
  "public_title": "read news",
  "public_description": "Read news"
}
{
  "id": 123456,
  "name": "read news",
  "title": "read news",
  "description": "Read news",
  "num_points": 123,
  "image": "https://cdn.crowdtwist.com/img/v2/7d1625e2cdde97c382a873c5c496984500d66a96/100/100/0/image.jpg",
  "category_id": "1",
  "category_name": "Share",
  "type_id": "1",
  "type_name": "Facebook",
  "activity_channel_id": null,
  "activity_channel_name": null,
  "freq_cap": "1",
  "freq_period_id": "2",
  "freq_period_name": "One calendar day",
  "freq_num_required_attempts": null,
  "redirect_url": null,
  "points_on_click": false,
  "action_tags": "ct_trck_news",
  "extra_data": null,
  "public_title": "read news",
  "public_description": "Read news"
}

Sample Error Response: Status Code 400

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