Fetch Available Offers

Fetches available offers or offer details of a user. This request returns how many offers are available to the user.

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

    For details, see User Agent.

  • Authorization
    Type: string
    required

    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
  • client
    Type: string
    required

    Client key of the business

  • authentication_token
    Type: string

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

    Sending invalid Signature

  • 422

    Sending invalid Entity

Request Example for get/api/auth/offers
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/offers \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --data '{
  "authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
  "client": "CLIENT_GOES_HERE"
}'
{
  "pinned_message": "",
  "rewards": [
    {
      "code": "531611",
      "id": 1014491,
      "business_id": 470,
      "redeemable_id": 105,
      "start_date": "2015-06-16",
      "end_date": "2015-07-15",
      "read_at": null,
      "start_date_tz": "2015-06-15T18:30:00Z",
      "end_date_tz": "2015-07-15T18:29:59Z",
      "gaming_level_id": null,
      "gifted_for_type": "Admin",
      "gift_reason": "Admin Generosity",
      "location_ids": [
        303133,
        303134
      ],
      "external_store_numbers": [
        "3613",
        "3614"
      ]
    }
  ],
  "notifications": [
    {
      "id": 8415352,
      "message": "notification message",
      "user_id": 111111111,
      "token": null,
      "sent_at": "2015-05-28T17:03:27Z",
      "kind": "campaign",
      "network": null,
      "status": "sent",
      "deleted_at": null,
      "created_at": "2015-05-28T17:03:26Z",
      "updated_at": "2015-05-28T17:03:27Z",
      "read_at": null,
      "business_name": "BUSINESS_NAME_GOES_HERE",
      "sent_at_tz": "2015-05-28T11:03:27-06:00"
    }
  ],
  "redeemables": [
    {
      "description": "Free Soft Drink (600 ml) when you purchase a Pizza!!",
      "discount_amount": 700,
      "id": 105,
      "image": "/images/punchh-icon-small.png",
      "name": "Free Soft Drink Offer!",
      "points": 0,
      "redeemable_id": 105,
      "thumb_image": "/images/punchh-icon-thumb.png",
      "applicable_as_loyalty_redemption": null
    }
  ]
}