Fetch Redemption Code (Redemptions 1.0)
This endpoint generates an internal tracking code, which can be used to look up a user on the POS system and redeem the selected reward or banked currency at the POS. To generate an internal tracking code via this endpoint, you must supply either a reward ID in the reward_id parameter or a value for the banked currency to redeem in the redeemed_points parameter. While the internal tracking code is active, the selected reward or banked currency value is eligible for redemption at the POS using the value of the internal tracking code as the redemption_code in the POS Redemption API endpoint.
User authentication required
This API requires authentication_token to be supplied as
HTTP_AUTHORIZATIONheader or in theauthentication_tokenparameter.
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
- Type: stringclientrequired
Client key of the business
- Type: number Format: doubleredeemed
_points requiredValue of banked currency to redeem. Use this field only if you have a Points Convert to Currency program type and you are trying to redeem banked currency. Otherwise, use the reward_id field only.
- Type: integer Format: int64reward
_id requiredReward ID (required if redeemed_points is not provided)
- Type: stringauthentication
_token The authentication token of the user. You can retrieve this from the response of a successful sign-in API call or through the SSO process.
- Type: integergps
_accuracy GPS accuracy
- Type: stringlatitude
Latitude of the redemption location
- Type: stringlocale
Locale used for language
- Type: integer Format: int32location
_id Location ID of the redemption
- Type: stringlongitude
Longitude of the redemption location
- Type: stringstore
_number Store number of the location. This can be used as an alternative to specify the location if location_id/latitute/longitude are not provided.
- application/json
- 401
Sending invalid credentials
- 412
Sending invalid Signature
- 422
Sending invalid Entity
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/redemptions \
--request POST \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"client": "CLIENT_GOES_HERE",
"location_id": 304155,
"locale": "",
"longitude": "75.8136926",
"latitude": "26.9167509",
"redeemed_points": null,
"reward_id": 12345,
"gps_accuracy": 27,
"store_number": "12"
}'
{
"internal_tracking_code": "2142353",
"expiry_hours": "24"
}