Fetch Challenge Details

Lists specific challenge details available for a business

Path Parameters
  • id
    Type: integer
    required

    Challenge ID

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

  • Accept-Language
    Type: string

    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.

  • Authorization
    Type: string
    required

    Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE.

Body
application/json
  • access_token
    Type: string
    required

    A security token that identifies a user

  • client
    Type: string
    required

    OAuth client ID provided by the business

Responses
  • application/json
  • application/json
Request Example for get/api2/mobile/challenges/{id}
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
}