Fetch Challenge Details
Lists specific challenge details available for a business
- Type: integeridrequired
Challenge ID
- 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 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: stringAccept
- Language Preferred language. Punchh supports multiple languages for the challenge name and description in the API response as per the locale specified in the Accept-Language request header for the campaign type challenge. Possible values: ar-kw for Arabic Kuwait, az for Azerbaijani, ca-ES for Catalan, en for English, en-CY for English-Cyprus, en-GB for English British, en-NZ for English-New Zealand, en-TT for English-Trinidad and Tobago, en-ca for English-Canada, es for Spanish, es-CR for Spanish Costa Rica, es-MX for Spanish Mexico, es-US for Spanish United States, fr for French, fr-ca for French-Canada, ro for Romania, vi for Vietnamese
The locales for a business are configured in the Punchh platform under Administration > Business Profile > Address. Click the Alternate Languages drop-down field to choose a language. In the Punchh platform, the admin of a business has to configure in the relevant language(s) the challenge name and description when creating or editing a campaign under Marketing Automation > Campaign Management. - Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
- Type: stringaccess
_token requiredA security token that identifies a user
- Type: stringclientrequired
OAuth client ID provided by the business
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/challenges/1 \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Accept-Language: ' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"access_token": "ACCESS_TOKEN_GOES_HERE"
}'
{
"progress": [
{
"completed_steps": 0,
"total_steps": 15
}
],
"name": "Potato Cheese Bites Club",
"description": "Buy 10 get 1 free",
"image_url": "IMAGE_URL_GOES_HERE",
"icon_url": "IMAGE_URL_GOES_HERE",
"icon_completed_url": "IMAGE_URL_GOES_HERE",
"start_date": "2019-06-24",
"end_date": "2022-12-31",
"gift_reason": "New Challenge",
"miscellaneous": "{\"detailedDescription\": \"Welcome to Potato Cheese ites club - Buy 10 get 1 free\", \"challengeType\":\"Clubs\",\"nounDescription\" : \"Potato Cheese Bites\"}",
"challenge_reach": "universal_auto_enrollment",
"challenge_status": "enrolled",
"challenge_type": "receipt_qualification",
"occurrence": "multiple",
"past_completions": 0,
"challenge_id": 34,
"enrollment_status": "active",
"enrolled_on": "2025-01-10T05:00:00+05:30",
"enrollment_expires": "2025-04-10T05:00:00+05:30",
"opted_in": true
}