Activities


Request Details

Item Value
Description Returns the list of active activities for a specific client.
Method GET
Endpoint https://api.crowdtwist.com/v2/activities?api_key=[apikey]


Request

Field Name Sample Value Required Format Notes
URL PARAMETERS  – none
QUERY STRING PARAMETERS
api_key QWERTYUIOP Yes String


Successful Response

Field Name Sample Value Required Format Description
id 1006156 Yes String Internal CrowdTwist activity id.
title Ad Hoc Points Yes String The title of the activity.
description Ad Hoc Points Yes String The description of the activity.
num_points 2000 Yes Integer The number of points a user will earn for completing the specified activity.
image http://www.imagestorage.com/image Yes URL The activity icon.
category_id 3 No String ID of category activity is member of.
type_id 7 Yes String ID indicating the type of activity.
Options:
1 = Facebook
2 = Merchandise
3 = Music
5 = Tickets
6 = Twitter
7 = Your Site
8 = Foursquare Check-in
9 = Code Redemption
extra_data null No JSON Extra data set via Control Center


Error Response

Field Name Sample Value Required Format Description
error param_error Yes String A machine readable code that describes the error.
message Missing the user_id parameter Yes String A short, descriptive sentence detailing the error.


Error Response Codes

Error Message
input_error The input provided in invalid or formatted incorrectly.
internal_error Something went wrong on our end.
page_not_found The requested page does not exist or has been removed.
param_error A missing or invalid parameter is included in the request.
no_activities There are no rewards available to this user.


Sample Request

    curl -X GET
    'https://api.crowdtwist.com/v2/activities?api_key=QWERTYUIOP'
    curl -X GET
    'https://api.crowdtwist.com/v2/activities?api_key=QWERTYUIOP'


Sample Successful Response: Status Code 200

[
  {
    "id": "1006156",
    "title": "Ad Hoc Points",
    "description": "Ad Hoc Points",
    "num_points": 200,
    "image": "http://crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "type_id": "7",
    "extra_data": null
  },
  {
    "id": "410044815",
    "title": "Added a Comment",
    "description": "Added a Comment",
    "num_points": 25,
    "image": "http://crowdtwist.com/img/v2/3b8c9c920a29636a5531beebd279b6712ebc417c/100/100/0/image.jpg",
    "category_id": "3",
    "type_id": "7",
    "extra_data": null
  }
]
[
  {
    "id": "1006156",
    "title": "Ad Hoc Points",
    "description": "Ad Hoc Points",
    "num_points": 200,
    "image": "http://crowdtwist.com/img/v2/d79b402d3209d59f699d1ae0c7c9ccc1d18b0188/100/100/0/image.jpg",
    "category_id": "3",
    "type_id": "7",
    "extra_data": null
  },
  {
    "id": "410044815",
    "title": "Added a Comment",
    "description": "Added a Comment",
    "num_points": 25,
    "image": "http://crowdtwist.com/img/v2/3b8c9c920a29636a5531beebd279b6712ebc417c/100/100/0/image.jpg",
    "category_id": "3",
    "type_id": "7",
    "extra_data": null
  }
]

Sample Error Response: Status Code 400

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