Activities
Request Details
Item | Value |
Description | This endpoint returns the list of active activities for a specific client. |
Method | GET |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/activities?api_key=[apikey] |
HTTP Header |
X-CT-Authorization = CTApiKey [API Key] Note: There is a space between CTApiKey and the API Key value. |
Content Type | application/json |
Request
Field Name | Sample Value | Required | Format | Description |
URL PARAMETERS – none | ||||
QUERY STRING PARAMETERS | ||||
api_key | QWERTYP | Yes | String |
Response
Response Body
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 | Null | String | The activity icon URL. Null if not present. |
category_id | 3 | Yes | String | ID of category activity is member of. Null if no category. |
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 | See the EXTRA DATA OBJECT section. | No | Object | Extra data set via Control Center. Null if no extra data. |
date_start | 1508167798 | No | Integer | Start date of activity. Null if not present. |
date_end | 1510846197 | No | Integer | End date of activity. Null if not present. |
min_tier_id | 12 | No | Integer |
The minimum tier that a user needs to be at in order to perform this activity. List of ID values will be provided by the CrowdTwist team. Null if no tier id. |
show_as_locked_by_tier | false | Yes | Boolean | Indicates whether the activity is hidden or locked. When show_as_locked_by_tier=true, the activity is locked. When show_as_locked_by_tier=false, the activity is hidden. |
EXTRA DATA OBJECT | ||||
Test | Test | No | String | Additional data as added. |
Error Responses
Field Name |
Sample Value |
Required |
Format |
Description |
---|---|---|---|---|
error |
Field value is empty. |
Yes |
String |
This is a short form of the error. |
message |
Value of field [fieldname] must not be empty |
Yes |
String |
This is a detailed message around the error specifying, as specifically as possible, what the fields are that are missing or where exactly the error is. |
Error Response Codes
Error | Error Code | Description | Reason |
---|---|---|---|
Input Error | 4xx | Returned whenever the request is missing required fields, including situations in which the body is malformed (e.g. HTTP method not supported, receipt not found, etc.). | – missing_data – not_unique – receipt_not_found – invalid_amount – invalid_currency – invalid_date – invalid_custom_field – invalid |
Server Error | 5xx | HTTP error status code is returned due to an error that occurred in the backend. | – internal_error: unexpected error occurred in the CrowdTwist backend – missing_field – invalid_data – not_configured: error occurs when an configuration has not been configured yet |
Example Response Codes
Response Code | Error | Message |
403 | invalid_auth | Invalid access credentials. |
Samples
Sample Request
Sample Response Body
Sample Error Response