Create Redemption Using Reward ID (Redemptions 1.0)
Creates a redemption for a reward that has been given to a user (e.g., through a campaign).
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringAccept
- Language Preferred language
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredUsed to Identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringpunchh
-app -device -id requiredThe app device ID helps Punchh identify each device so that certain rewards can be awarded individually to each device instead of per user. For example, the sign-up reward is given to each device ID to prevent fraudulent sign-ups so that a user cannot do repeated sign-ups from a single device to get rewards. It should not change even if the user resets a device. See the sample code to generate the punchh-app-device-id header.
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: integergps
_accuracy Accuracy of a user's device GPS
- Type: stringlatitude
Latitude coordinate of the redemption location. Must be provided if a location_id is not passed as a parameter.
- Type: integerlocation
_id Location ID at which a user wants to do the redemption. If a particular location ID is provided in the request, the redemption will be valid only at that location and will not be possible at any other.
- Type: stringlongitude
Longitude coordinate of the redemption location. Must be provided if a location_id is not passed as a parameter.
- Type: integer Format: int64reward
_id The ID of the reward for which the redemption code has to be created
- application/json
- 400
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/redemptions/reward \
--request POST \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppIdentifier/VersionNumber/BuildNumber(OS_Type)' \
--header 'punchh-app-device-id: APP_DEVICE_ID_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"reward_id": 5167827,
"location_id": "304155",
"latitude": 26.9167509,
"longitude": 75.8136926,
"gps_accuracy": 27
}'
{
"redemption_status": "redeemable",
"created_at": "2016-05-25T06:55:04-05:00",
"redeemable_id": 75,
"location_id": 304361,
"redemption_image_url": "IMAGE_URL_GOES_HERE",
"redemption_message": "Redeem your Free Bag of Chips",
"updated_at": "2016-05-25T06:55:04-05:00",
"redeemable_description": "",
"redemption_id": 1818920,
"redemption_tracking_code": "1809897",
"expiring_at": "2016-05-25T08:55:04-05:00",
"redeemable_name": "Bag of Chips",
"campaign_name": "Mass Campaign Offer",
"redeemed_value": null
}