List Available Rewards
Fetch available rewards or offers details of a user. This request returns how many rewards are available to the user.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- 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.
Body
application/json
- Type: stringclientrequired
Client key of the business
- 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.
Responses
- application/json
- 401
- 412
Sending invalid Signature
- 422
Sending invalid Entity
Request Example for get/api/auth/rewards
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/rewards \
--header 'x-pch-digest: SIGNATURE_GOES_HERE' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE"
}'
[
{
"reward": {
"id": 309203,
"business_id": 452,
"location_id": 302576,
"user_id": 111111111,
"redeemable_id": 41,
"free_punchh_campaign_id": null,
"redemption_id": null,
"checkin_id": null,
"admin_id": null,
"created_at": "2015-03-31T11:41:52Z",
"updated_at": "2015-03-31T11:41:52Z",
"code": "907350",
"start_date": "2015-03-31",
"end_date": "2015-04-29",
"read_at": null,
"gaming_level_id": null,
"gifted_for_type": "SignupCampaign",
"gifted_for_id": 50,
"gift_reason": "Signup: Free Small The Original Sandwich with purchase of chips and 32 oz drink",
"location_ids": [
303133,
303134
],
"external_store_numbers": [
"3613",
"3614"
]
}
}
]