Activity Stream
Request Details
Item | Value |
Description | This endpoint returns a list of recent activities performed by all members of the program. |
Method | GET |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/stream?api_key=[API_KEY]&n=[n] |
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 PARAMETERS | ||||
api_key | QWERTYUIOP | Yes | String | |
n | 10 | Yes | Interger | The number of records to return (≤15). |
Response
Response Body
Field Name | Sample Value | Required | Format | Description |
count | 15 | Yes | Interger | Number of records returned. |
Records | See the RECORDS ARRAY section. | Yes | Array | Details of each recently completed activity. |
RECORDS ARRAY | ||||
link_href | https://rewards.com/claim-points | No | String | The specified activity URL. |
activity_image | https://website.com/image.jpg | Yes | String | The specified activity icon. |
activity_text | redemeed a code. | Yes | String | The description of the specified activity completed. |
id | 301321041 | Yes | Integer | Internal CrowdTwist activity id. |
username | axyz | Yes | String | Username of the user who completed the specified activity. |
first_name | Leslie | Yes | String | First name of the user who completed the specified activity. |
display_first_name | true | Yes | Boolean | If the user should have their first name shown. |
completed_time | 1482933258 | Yes | Integer | Time at which the user completed the specified activity. It is represented in Unix timestamp. |
num_points | 1875 | Yes | Integer | Number of points the user earned for completing the specified activity. |
content_link | https://rewards.com/claim1-points | No | String | Link to the content. |
content_title | axyz | No | String | Title of the content. |
content_description | axyz | No | String | Description of the content. |
content_img | https://website.com/image2.jpg | No | String | Image of the content. |
display_name | Leslie N. | No | String | Stylized version of the customer’s name to display. |
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 |
400 | param_error | Missing n query parameter. |
403 | invalid_auth | Invalid access credentials. |
Samples
Sample Request Body
Sample Response Body
Sample Error Response