Activity Search
Request Details
| Item | Value |
| Description | This endpoint returns details of a specific activity for a specific client. It returns the enhanced set of activity attribute details. |
| Method | GET |
| Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/activities/[activity_id]/extended?api_key=[api_key] |
| 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 | ||||
| activity_id | 64 | Yes | String | CrowdTwist generated activity ID. |
| QUERY PARAMETERS | ||||
| api_key | QWERTYP | Yes | String | |
Response
Response Body
| Field Name | Sample Value | Required | Format | Description |
| id | 64 | Yes | String | Internal CrowdTwist Activity ID. |
| name | Watched a video | Yes | String | The name of the activity. |
| title | Watched A Video | Yes | String | The title of the activity. |
| description | Watched A Video | Yes | String | The description of the activity. |
| num_points | 25 | Yes | Integer | The number of points an activity is worth. |
| image | http://www.imagestorage.com/image | Yes | String | The URL to the activity image |
| category_id | 3 | Yes | String | An internal CrowdTwist Category ID that corresponds to the category_name. Value can be between 1 to 4. |
| category_name | Interact | Yes | String | The name of the category assigned to the activity: 1 = Share 2 = Socialize 3 = Interact 4 = Buy |
| type_id | 7 | Yes | String | An internal CrowdTwist Type ID that corresponds to the type_id. Value can be between 1 to 8. |
| type_name | Your Site | Yes | String | 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 | String | Internal Activity Channel ID that corresponds to activity channel name. Value can be between 1 to 26. Null if no value is present. |
| activity_channel_name | null | No | String | 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 | No | String | The number of times a member can complete an activity. Null if no value is present. |
| freq_period_id | 2 | No | String | The internal frequency period id. Value can be between 1 to 9. Null if no value is present. |
| freq_period_name | One Calendar Day | No | String | 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 | 2 | No | String | The number of times the activity must completed before points are awarded. Null if no value is present. |
| redirect_url | www.crowdtwist.com | No | String | Redirect URL that the member is taken to when selecting on certain the activity titles (e.g. point-on-click; JS Tag). Null if no value is present. |
| points_on_click | true | Yes | String | Denotes whether an activity is a point on click |
| action_tags | null | No | String | The JavaScript tag that is used to award points for activities that are tracked via JS Tag. Null if no value is present. |
| date_start | 1508167798 | No | Integer | Start date of the date range for history in UTC timezone. There is a limit of one year for date_start to date_end. A longer range will return an error stating date range should not exceed more than an a year. Null if no value is present. |
| date_end | 1510846197 | No | Integer | End date of the date range for history in UTC timezone. Date_end must be greater than date_start. Null if no value is present. |
| min_tier_id | 334 | No | Integer | Minimum tier required for activity. Null if no value is present. |
| show_as_locked_by_tier | false | Yes | Boolean | Indicates whether the activity is hidden or locked. When it is true, the activity is locked. When it is false, the activity is hidden. |
| public_title | Watch A Video | Yes | String | The member-facing title of the activity. |
| public_description | Daily points for every video! | Yes | String | The member-facing description of the activity. |
| activity_tag |
See the ACTIVITIES TAG ARRAY section. |
No | Array | List of tags associated with activity. Empty array if no value is present. |
| segment |
See the SEGMENT OBJECT section. |
No | Object | Segment for which activity is applicable. Null if no value is present. |
| extra_data | See the EXTRA DATA OBJECT section. | No | Object | Additional data for the activity. Null if no value is present. |
| ACTIVITIES TAG ARRAY | ||||
| tag_name | “Retail” | Yes | String | Name of the tag. |
| tag_id | 2 | Yes | Integer | Identifier of the tag. |
| SEGMENT OBJECT | ||||
| name | “New York Members” | Yes | String | This is the name of the segment. |
| subscription_id | 2 | Yes | Integer | This is the identifier of the segment. |
| eligibility_type | "inclusion" | Yes | String | If the eligibility type is "inclusion", this activity is only available to members of this segment. If the eligibility type is "exclusion", this activity is available to everyone except members of this segment. |
| 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 |
| 404 | no_data | Activity not found. |
| 403 | invalid_auth | Invalid access credentials. |
Samples
Sample Request Body
Sample Response Body
Sample Error Response