Points Expiration
Request Details
Item | Value |
Description | This endpoint is used to get details of points expiring for a specific member based on point expiration rules. |
Method | GET |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/users/[user_id]/points_expiration?api_key=[api_key]&id_type=[id_type] |
HTTP Header | X-CT-Authorization = CTApiKey [API Key] Note: there is a space between CTApiKey and the API Key value |
Request
Field Name | Sample Value | Required | Format | Description |
URL PARAMETERS | ||||
user_id | 11138266 | Yes | String | Unique ID of the user for whom the points expiration data needs to be returned. Unique ID can be any of the below: – Email Address – Facebook User ID – Twitter User ID – CrowdTwist ID – Third Party ID – Username – Mobile Phone Number Note: This should be similar to all other API Calls |
QUERY PARAMETERS | ||||
api_key | EHhs183jsu | Yes | String | Unique API key of the client. |
id_type | No | String | Id type of the user needs to be specified if default crowdtwist id is not used. Type of ID: – third_party_id – mobile_phone_number – facebook_user_id – twitter_user_id – id (CrowdTwist ID) – default ID if id_type is not specified – username |
Response
Response Body
Field Name | Sample Value | Required | Format | Description |
inactivity_ points_expiration |
See the INACTIVITY POINT |
No | Array | The array is present if point expiration rule is set to - Point Expire after a period of inactivity. |
redemption_period_ |
See the REDEMPTION PERIOD POINT |
No |
Array |
The array is present if point expiration rule is set to - Point Expire after a set of redemption period. The array will show point details for 6 month forward period, current month and 3 month trailing period. |
INACTIVITY POINT EXPIRATION ARRAY | ||||
last_qualified_date |
2021-05-20T18:25:43.511-04:00 |
Yes |
String |
The UTC date & time the of the last qualifying activity performed. This date must be an ISO-8601 compliant date field. |
expiration_date |
2021-05-20T18:25:43.511-04:00 |
Yes |
String |
The UTC date & time when the points will be expired. This date must be an ISO-8601 compliant date field. |
days_until_expiry |
50 |
Yes |
Integer |
Number of days left after which points will be expired for inactivity period. |
points_expiring | 200 | Yes | Integer | Number of points that will be expiring if qualified activity is not performed. |
points_expired | 0 | Yes | Integer | Number of points expired in the given month. It will be 0 for future months. |
points_expiring | 100 | Yes | Integer | Number of points expiring in the given month. It will be 0 for trailing months. |
points_redeemed | 40 | Yes | Integer | Number of points redeemed in the given month. |
expiration_date |
2021-05-20T18:25:43.511-04:00 |
Yes |
String |
The UTC date & time the of points expiration per month. This date must be an ISO-8601 compliant date field. |
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 |
200 | page_not_found | Unable to find points expiration configuration. |
403 | invalid_auth | Invalid access credentials. |
404 | page_not_found | Unable to find user. |
500 | internal_error | An error has occurred. |
Samples
Sample Request Body
Sample Response Body
When Point expiration rule is set to - Points Expire after a set redemption period.
When Point expiration rule is set to - Points Expire after a period of inactivity.
When Multi Point expiration rules are set and member has points across different expiration rules.
Sample Error Response