Fetch Account Balance of User

Returns account balance details of a guest, such as banked_rewards, membership_level, net_balance, net_debits, pending_points, points_balance, signup_anniversary_day, total_credits, total_debits, total_point_credits, total_redeemable_visits, etc.

User authentication required

This API requires authentication_token to be supplied as HTTP_AUTHORIZATION header or in the authentication_token parameter.

Headers
  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Accept-Language
    Type: string

    Set to the language you are using.

  • User-Agent
    Type: string
    required

    For details, see User Agent.

  • 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

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

    Sending invalid credentials

  • application/json
  • 422

    Sending invalid Entity

Request Example for get/api/auth/checkins/balance
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/checkins/balance \
  --header 'x-pch-digest: SIGNATURE_GOES_HERE' \
  --header 'Accept-Language: en' \
  --header 'User-Agent: Punchh/OnlineOrder/1.0/Web/BrowserVersion/OS_Type' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE"
}'
{
  "balance": {
    "banked_rewards": "376.00",
    "membership_level": null,
    "membership_level_id": null,
    "net_balance": 376,
    "net_debits": 1100,
    "pending_points": 0,
    "points_balance": 1476,
    "signup_anniversary_day": "09/30",
    "total_credits": 1476,
    "total_debits": "1100.0",
    "total_point_credits": 1476,
    "total_redeemable_visits": 98,
    "expired_membership_level": null,
    "total_visits": 87,
    "initial_visits": 0,
    "unredeemed_cards": 19,
    "membership_qualification_points": 500
  },
  "rewards": [
    {
      "business_id": 603,
      "end_date": null,
      "end_date_tz": null,
      "gaming_level_id": null,
      "gifted_for_type": null,
      "gift_reason": null,
      "id": 1089,
      "location_ids": [],
      "read_at": null,
      "redeemable_id": 1089,
      "reward_properties": null,
      "start_date": "2017-12-14",
      "start_date_tz": "2017-12-14T13:04:55Z",
      "external_store_numbers": [],
      "type": "redeemable"
    },
    {
      "business_id": 603,
      "end_date": null,
      "end_date_tz": null,
      "gaming_level_id": null,
      "gifted_for_type": "FeedbackReply",
      "gift_reason": "Support Activity",
      "id": 17111231,
      "location_ids": [],
      "read_at": "2016-12-12T07:53:20Z",
      "redeemable_id": 1260,
      "reward_properties": null,
      "start_date": "2016-11-28",
      "start_date_tz": "2016-11-28T13:56:29Z",
      "external_store_numbers": [],
      "type": "reward"
    }
  ],
  "redeemables": [
    {
      "applicable_as_loyalty_redemption": true,
      "redeemable_properties": null,
      "discount_amount": 0,
      "discount_channel": "all",
      "expire_redemption_code_with_reward_end_date": false,
      "id": 1089,
      "image": "IMAGE_URL_GOES_HERE",
      "points": 100,
      "redeemable_id": 1089,
      "redemption_expiry": 240,
      "thumb_image": "IMAGE_URL_GOES_HERE",
      "name": "Free Pizza or Entree Salad @ 100 Points",
      "description": "Congrats! You banked a Free Pizza or Entree Salad for earning 100 points!"
    },
    {
      "applicable_as_loyalty_redemption": false,
      "redeemable_properties": null,
      "discount_amount": 0,
      "discount_channel": null,
      "expire_redemption_code_with_reward_end_date": null,
      "id": 1260,
      "image": "IMAGE_URL_GOES_HERE",
      "points": 0,
      "redeemable_id": 1260,
      "redemption_expiry": 240,
      "thumb_image": "IMAGE_URL_GOES_HERE",
      "name": "Free Cookie",
      "description": "Enjoy your free cookie."
    }
  ]
}