User Points


Request Details

Item Value
Description Returns user points
Method GET
Endpoint https://api.crowdtwist.com/v2/users/[user_id]/points?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
– facebook_user_id
– twitter_user_id
– id (CrowdTwist ID) – default ID if id_type is not specified
– third_party_id
– username
– mobile_phone_number


Successful Response

Field Name Sample Value Required Format Description
id 16 Yes String Internal CrowdTwist member user_id
Total points 1000 Yes Integer Total points of the user
redeemable_points 1000 Yes Integer Redeemable points of the user
num_points_purchased 0 Yes Integer Num points purchased by the user
Activities Object
name user registration Yes String Internal CrowdTwist activities name
num_points 1000 Yes Integer Internal CrowdTwist activities num points
notes null Yes String Internal CrowdTwist activities notes
date_created   No Integer Internal CrowdTwist activities created date
fan_level New Fan Yes String Internal CrowdTwist activities created date

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.

Sample Request

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

Sample Successful Response

{
 "id": 16,
 "total_points": 1000,
 "redeemable_points": 1000,
 "num_points_purchased": 0,
 "activities": 
   [
     {
     "name": "user registration",
     "num_points": 1000,
     "notes": null,
     "date_created": 1460793600
     }
   ],
 "fan_level": "New Fan"
}
{
 "id": 16,
 "total_points": 1000,
 "redeemable_points": 1000,
 "num_points_purchased": 0,
 "activities": 
	 [
		 {
		 "name": "user registration",
		 "num_points": 1000,
		 "notes": null,
		 "date_created": 1460793600
		 }
	 ],
 "fan_level": "New Fan"
}

Sample Error Response

{
  "error": "param_error",
  "message": "User does not exist."
}
{
  "error": "param_error",
  "message": "User does not exist."
}