Activities – Extended
Request Details
| Item | Value |
| Description |
This endpoint returns the enhanced set of activity attribute details. v2.1 of the extended activities endpoint also allows for paginated responses. |
| Method | GET |
| Endpoint | https://[environment]api[client_id].crowdtwist.com/v2.1/activities/extended?api_key=[api_key]&page=[page_number]&page_size=[page_size] |
| Content Type | application/json |
Request
| Field Name | Sample Value | Required | Format | Description |
| URL PARAMETERS – none | ||||
| QUERY PARAMETERS | ||||
| api_key | QWERTYP | Yes | String | |
| page | 1 | No | Integer |
Clients have the option to send request for a specific page number.
|
| page_size | 10 | No | Integer | The size of page that is returned in the response (max of 25). If no page_size is specified, we default with 10 rewards in the response. |
Response
Response Body
| Field Name | Sample Value | Required | Format | Description |
| paging |
See the PAGING OBJECT section. |
Yes | Object | Array that stores information on the specified page of purchases. |
| activities |
See the ACTIVITIES ARRAY section. |
Yes | Array (Activities objects) | Array of Activity information. |
| PAGING OBJECT | ||||
| total | 203 | Yes | Integer | This is the total number of rewards. |
| pages | 10 | Yes | Integer | This is the total page numbers. |
| next_page | http://example.ct.com/v2.1/rewards?page=3 | No | String | This is the URL of the next page. |
| prev_page | http://example.ct.com/v2.1/rewards?page=1 | No | String | This is the URL of the previous page. |
| ACTIVITIES ARRAY | ||||
| id | 1006156 | Yes | String | Internal CrowdTwist activity id. |
| name | Watched A Video | Yes | String | The name of the activity. |
| 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 | String | The activity icon URL. |
| category_id | 3 | Yes | String |
ID of category activity is member of. Null if no category. |
| 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 | ID indicating the type of activity.
Options: 1 = Facebook 2 = Merchandise 3 = Music 4 = Tickets 5 = Twitter 6 = Your Site 7 = Check-In 8 = Code Redemption |
| 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 | 1 | Yes | String | Internal Activity Channel ID that corresponds to activity channel name. 1 = Ad hoc points 2 = Code redemption cap 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 |
| activity_channel_name | Ad hoc points | Yes | String | The channel name associated with channel id. 1 = Ad hoc points 2 = Code redemption cap 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 | String | The number of times a member can complete an activity. |
| freq_period_id | 2 | Yes | String | The internal frequency period id. 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) 10 = 90 Days 11 = 180 Days |
| freq_period_name | One Calendar Day | Yes | 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) 10 = 90 Days 11 = 180 Days |
| freq_cap | 1 | No | String | The number of redemptions that can table place based on the freq_period_id and freq_period_name. |
| freq_period_id | 2 | No | String | The id of the freq_period_name value. |
| freq_period_name | Calendar Day | No | String | The time period for which redemptions can take place. |
| freq_num_required_attempts | 1 | Yes | String | The number of times the activity must completed before points are awarded. |
| redirect_url | www.crowdtwist.com | Yes | String | 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 | String | Denotes whether an activity is a point on click. |
| action_tags | <tag> | Yes | String | The JavaScript tag that is used to award points for activities that are tracked via JS Tag. |
| date_start | 1508167798 | Yes | Date | Start date of activity. |
| date_end | 1510846197 | Yes | Date | End date of activity. |
| min_tier_id | 12 | Yes | String | 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. |
| 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. |
| 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. |
| partner_info |
See the PARTNER OBJECT section. |
Yes | Object | Partner info associated with activities. |
| activity_tag |
See the ACTIVITIES TAG OBJECT section. |
Yes | Array | Tags associated with activities. |
| segment |
See the SEGMENT OBJECT section. |
Yes | Object | Segment associated with activities. |
| extra_data | See the EXTRA DATA OBJECT section. | Yes | Object | This is client defined additional data. |
| 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. |
| PARTNER OBJECT | ||||
| id | 56577 | Yes | Integer | This is the id of the partner. |
| name | Acme Car Rentals | Yes | String | This is the name of the partner. |
| 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 Body
Sample Response Body
Sample Error Response