List All Deals

Returns all available deals for a user. The page and per_page request parameters determine the page(s) returned and the number of deals returned per page. If the per_page parameter is not sent, the API returns up to 10 deals in the response.

Headers
  • Authorization
    Type: string
    required

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

  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • Content-Type
    Type: string
    required

    Set this header to application/json.

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

Body
application/json
  • client
    Type: string
    required

    OAuth client ID provided by the business

  • page
    Type: integer

    Page number. If page is specified, only that page will be returned using the value of per_page as the number of deals returned on that page.

  • per_page
    Type: integer

    Number of deals per page. If per_page is not specified, the API defaults to 10 deals in response.

Responses
  • application/json
Request Example for get/api2/mobile/deals
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/deals \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'x-pch-digest: {{$$.env.signature}}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "page": 1,
  "per_page": 20
}'
[
  {
    "applicable_as_loyalty_redemption": false,
    "redeemable_properties": "",
    "discount_amount": 0,
    "discount_channel": "all",
    "expire_redemption_code_with_reward_end_date": false,
    "id": 23,
    "image": "IMAGE_URL_GOES_HERE",
    "points": 0,
    "redeemable_id": 23,
    "redemption_expiry": 240,
    "thumb_image": "IMAGE_URL_GOES_HERE",
    "meta_data": "",
    "redeemable_uuid": "ID_GOES_HERE",
    "name": "BOGO Breadsticks",
    "description": "",
    "auto_select": true,
    "start_time": "2021-04-28T13:59:47+05:30"
  }
]