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_AUTHORIZATION header or in the authentication_token parameter.

Headers

  • The signature for the API call

  • Set this header to application/json.

  • Advertises which content types the client is able to understand

  • For details, see User Agent.

  • 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.

Body

application/json
  • Client key of the business

  • Value 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.

  • Reward ID (required if redeemed_points is not provided)

  • 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.

  • GPS accuracy

  • Latitude of the redemption location

  • Locale used for language

  • Location ID of the redemption

  • Longitude of the redemption location

  • Store number of the location. This can be used as an alternative to specify the location if location_id/latitute/longitude are not provided.

Responses

  • application/json
  • Sending invalid credentials

  • Sending invalid Signature

  • Sending invalid Entity

Request Example for post/api/auth/redemptions
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"
}