List Challenges
Lists challenges available for a business
- 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: stringclientrequired
OAuth client ID provided by the business
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/challenges \
--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: ' \
--data '{
"client": ""
}'
{
"challenges": [
{
"gift_reason": "Punchh product qa test currency",
"id": 124872,
"icon": "IMAGE_URL_GOES_HERE",
"icon_completed": "IMAGE_URL_GOES_HERE",
"name": "Punchh product qa test currency",
"start_date": null,
"end_date": null,
"image_url": "IMAGE_URL_GOES_HERE",
"description": "",
"tasks": [
{
"name": "Punchh product qa test currency",
"number_of_steps": 10
}
],
"miscellaneous": "",
"challenge_reach": "segment_auto_enrollment",
"challenge_type": "every_x_points",
"occurrence": "single"
},
{
"gift_reason": "Punchh product qa test redeemable",
"id": 124873,
"icon": "IMAGE_URL_GOES_HERE",
"icon_completed": "IMAGE_URL_GOES_HERE",
"name": "Punchh product qa test redeemable",
"start_date": null,
"end_date": null,
"image_url": "IMAGE_URL_GOES_HERE",
"description": "",
"tasks": [
{
"name": "Punchh product qa test redeemable",
"number_of_steps": 1
}
],
"miscellaneous": "",
"challenge_reach": null,
"challenge_type": "segment",
"occurrence": "single"
},
{
"gift_reason": "Buy 5 Cheese Breadsticks",
"id": 124875,
"icon": "IMAGE_URL_GOES_HERE",
"icon_completed": "IMAGE_URL_GOES_HERE",
"name": "Buy 5 Cheese Breadsticks",
"start_date": "2020-11-30",
"end_date": "2021-03-31",
"image_url": "IMAGE_URL_GOES_HERE",
"description": "Buy 5 Cheese Breadsticks",
"tasks": [
{
"name": "Buy 5 Cheese Breadsticks",
"number_of_steps": 5
}
],
"miscellaneous": "{\"detailedDescription\":\"Earn 50 bonus points after you purchase five breadsticks. Your points will automatically be added to your account after completion. Terms & Conditions may apply. Complete by 12/31/2020.\", \"GiftType\":\"fuel\", \"GiftPoints\":\"0.55\", \"challengeType\":\"Personal\", \"nounDescription\" : \"fuel\"}",
"challenge_reach": "segment_auto_enrollment",
"challenge_type": "receipt_qualification",
"occurrence": "single"
},
{
"gift_reason": "Get your 4th Breadstick free",
"id": 124876,
"icon": "IMAGE_URL_GOES_HERE",
"icon_completed": "IMAGE_URL_GOES_HERE",
"name": "Buy 4 Breadsticks!",
"start_date": "2020-11-30",
"end_date": "2021-02-10",
"image_url": "IMAGE_URL_GOES_HERE",
"description": "Get your 4th Breadstick free",
"tasks": [
{
"name": "Buy 4 Breadsticks!",
"number_of_steps": 3
}
],
"miscellaneous": "{\"detailedDescription\":\"Get your next cheese breadstick free after you purchase three breadsticks. . Terms & Conditions may apply. Complete by 12/31/2020.\", \"GiftType\":\"offer\", \"GiftPoints\":\"50% off , Breadstick\", \"challengeType\":\"Personal\",\"nounDescription\" : \"breadsticks\"}",
"challenge_reach": "segment_auto_enrollment",
"challenge_type": "receipt_qualification",
"occurrence": "multiple"
}
]
}