Reward Details

Request Details

Item Value
Description This end point will lookup Reward by a particular reward variation ID. The Get Rewards API currently returns all rewards with their variation ID.
Method GET
Endpoint https://[environment]api[client_id].crowdtwist.com/v2.1/rewards/[reward_id]?api_key=[api_key]
Content Type application/json

Request

Field Name Sample Value Required Format Description
URL PARAMETERS
reward_id 123455678901 Yes Integer Variation ID of the Reward.
QUERY PARAMETERS
api_key QWERTYUIOP Yes String  

Response

Response Body

Field Name Sample Value Required Format Description
id 453988 Yes Integer The is the internal CrowdTwist reward id.
title 10% Off Coupon Yes String This is the title of the reward.
description Receive a 10% off coupon when you redeem 1000 points. Yes String This is the description of the reward.
current_quantity 750 Yes Integer Current number of this reward that is available.
num_points 100 Yes Integer The number of points a user must redeem to be issued the reward.
date_start 1490688000 Yes Integer This the unix timestamp of date when reward initially becomes available.
date_end 1493193600 No Integer This the unix timestamp of date when reward stops being available.
date_end_redeemable 1425404945 No Integer This the unix timestamp of date when reward stops being available for redemption.
is_enabled 1 Yes Boolean This is the boolean value indicating if reward is enabled.
category_id 16 Yes Integer This is reward category id.
group_id 3453 Yes Integer This is the group of the reward. When a reward has multiple sizes/colors, they will all share the same group_id.
no_end_date 1 Yes Boolean This is the boolean value indicating if there is no end date.
total_quantity 200 Yes Integer This is the total number of this reward that is available.
max_select_quantity 3 No Integer This is the maximum number of this reward a user can select.
max_per_user 5 Yes Integer This is the maximum number of this reward a user can redeem.
is_shipping_required 1 Yes Boolean This is the boolean value indicating if shipping is required.
is_phone_number_required 1 Yes Boolean This is the boolean value indicating if phone number is required.
is_min_age_required 1 Yes Boolean This indicates if a minimum age is required and can be 0 or 1.
min_age 13 No Integer This is the minimum age required for a use to redeem this reward.
is_digital_download 1 Yes Boolean This is the boolean value indicating if reward is digital download.
sweepstakes_winners 100 No Integer If Sweepstakes – this indicated total number of potential sweepstakes winners.
extra_data See the EXTRA DATA OBJECT section. No Object This is client defined additional data, max limit of 20.
show_as_locked 1 Yes Boolean This shows reward as locked or hide the reward from a user, if user has not met the unlock criteria.
featured_order_num 453 No Integer The order in which a reward appears in a list of featured rewards.
reference_id 46a6sd No String This is the custom identifier that can be set in Control Center per reward/reward variation.
color Red No String Reward color for reward with variations.
size Medium No String Reward size for reward with variations.
total_coupons 1000 Yes Integer If code reward – Number of coupons uploaded.
remaining_coupons 100 Yes Integer If code reward – Number of coupons remaining unredeemed.
freq_cap 1 No String The number of redemptions that can table place based on the freq_period_id and freq_period_name.

Below periods can be chosen:

  • 1 = 24 hours
  • 2 = Calendar day
  • 3 = 7 days
  • 4 = Calendar week
  • 5 = Lifetime
  • 6 = Calendar month
  • 7 = Calendar year
  • 8 = 365 days
  • 9 = 30 days
  • 10 = 90 days
  • 11 = 180 days
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.
additional_images See the ADDITIONAL IMAGES ARRAY section. No Array (Strings) This is the array of string for additional images URL that is uploaded.
image http://www.example.com/image Yes String This is the reward image URL.
reward_terms http://cdn.crowdtwist.com/file /67d/reward_terms.pdf No String If a sweepstakes reward with a terms & conditions file, the URL of the PDF.
Note: Agreement of this must be controlled via the redemption method.
min_tier_id 45 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.
segment

See the SEGMENT OBJECT section.

No Object This object contains the segment information.
partner_info

See the PARTNER OBJECT section.

No Object This object contains the partner details.
EXTRA DATA OBJECT
city New York No String City information.
state New York No String State information.
country USA No String Country information.
postal code 10010 No String Postal code information.
ADDITIONAL IMAGES ARRAY
additional_images http://www.example.com/image1 Yes String Any additional reward images, in addition to the one image that is required for every reward.
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 reward is only available to members of this segment. If the eligibility type is "exclusion", this reward 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.


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 page_not_found Reward with ID 9492 not found.
403 invalid_auth Invalid access credentials.

Samples

Sample Request Body

curl -X GET https://api.crowdtwist.com/v2.1/rewards/[reward_id]?api_key=QWERTYUIOP


Sample Response Body

{ "id": "541043", "title": "Test Reward #7", "description": "Reward with variance and required shipping and phone", "current_quantity": 4, "num_points": 20, "date_start": 1402057860, "date_end": null, "date_end_redeemable": null, "is_enabled": 1, "category_id": 2631, "group_id": 8116, "no_end_date": 1, "total_quantity": 9999999, "max_select_quantity": null, "max_per_user": 2, "is_shipping_required": 0, "is_phone_number_required": 1, "is_min_age_required": "0", "min_age": null, "is_digital_download": 0, "sweepstake_winners": null, "extra_data": null, "show_as_locked": "0", "featured_order_num": null, "reference_id": "46a6sd ", "color": "Neon", "size": "42", "total_coupons": 0, "remaining_coupons": 0, "freq_cap": null, "freq_period_id": null, "freq_period_name": null, "additional_images": [], "image": "https://cdn.crowdtwist.com/img/v2/image.jpg", "reward_terms": null, "min_tier_id": null, "segment": { "name": "5x login", "subscription_id": 123, "eligibility_type": "inclusion" }, "partner_info": { "id": 4869684, "name": "Acme Car Rentals" } }


Sample Error Response

{ "error": "page_not_found", "message": "Reward with id 12345 not found." }