Fetch User Balance
Displays user information regarding active redemptions, notifications, badges, balance, etc.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringAccept
- Language Preferred language
- 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.
Body
application/json
- Type: stringclientrequired
OAuth client ID provided by the business
Responses
- application/json
- application/json
Request Example for get/api2/mobile/users/balance
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/users/balance \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE"
}'
{
"converted_category_balances": [
{
"category_id": 1,
"name": "Casey Cash",
"source_type": "points",
"source_value": 250,
"min_source_value": 250,
"converted_type": "currency",
"converted_value": 1,
"balance": "42.36"
},
{
"category_id": 2,
"name": "Fuel",
"source_type": "points",
"source_value": 250,
"min_source_value": 250,
"converted_type": "fuel_discount",
"converted_value": 0.05,
"balance": "0.50"
},
{
"category_id": 4,
"name": "Charity",
"source_type": "points",
"source_value": 250,
"min_source_value": 250,
"converted_type": "charity",
"converted_value": 1,
"balance": "20.00"
}
],
"active_redemptions": [],
"challenge_badges": [
{
"badge_id": 121,
"challenge_campaign_id": 7,
"published": false,
"public_url": "URL_GOES_HERE",
"challenge_campaign_status": "active"
},
{
"badge_id": 877,
"challenge_campaign_id": 7,
"published": false,
"public_url": "URL_GOES_HERE",
"challenge_campaign_status": "active"
},
{
"badge_id": 8992,
"challenge_campaign_id": 124856,
"published": false,
"public_url": "URL_GOES_HERE",
"challenge_campaign_status": "deactivated"
}
],
"coupons": [
{
"code": "CPUNCHHC8KR0B3D",
"image_url": "IMAGE_URL_GOES_HERE",
"name": "Free Breadsticks",
"description": "",
"start_date": "2019-05-15",
"end_date": null
}
],
"messages": [],
"notifications": [],
"rewards": [
{
"becomes_available_at": "2019-04-08T12:53:13-05:00",
"campaign_type": null,
"created_at": "2019-04-08T12:53:13-05:00",
"description": "TEST",
"discount_channel": "all",
"discount_amount": null,
"reward_image_url": "IMAGE_URL_GOES_HERE",
"name": "$1 discount on test item",
"read_at": null,
"reward_properties": "",
"store_numbers": [],
"franchisee_id": null,
"meta_data": "[{\"item\":\"1010\", \"qty\":\"1\",\"type\":\"food\"}, {\"item\":\"1011\", \"qty\":\"2\",\"type\":\"drink\"}]",
"redeemable_created_at": "2019-04-08T12:49:52-05:00",
"reward_id": 5,
"expiring_at": null,
"expiring_at_tz": null,
"redemption_details": null,
"auto_select": true
},
{
"becomes_available_at": "2019-05-29T08:11:40-05:00",
"campaign_type": "deal",
"created_at": "2019-05-29T08:11:40-05:00",
"description": "",
"discount_channel": "all",
"discount_amount": 0,
"reward_image_url": "IMAGE_URL_GOES_HERE",
"name": "Base Redeemable",
"read_at": null,
"reward_properties": "",
"store_numbers": [],
"franchisee_id": null,
"meta_data": "",
"redeemable_created_at": "2019-03-11T08:05:41-05:00",
"reward_id": 343,
"expiring_at": null,
"expiring_at_tz": null,
"redemption_details": null,
"auto_select": true
},
{
"becomes_available_at": "2020-12-01T14:58:03-06:00",
"campaign_type": null,
"created_at": "2020-12-01T14:58:03-06:00",
"description": "Enjoy a free coffee courtesy of Casey's. ",
"discount_channel": "all",
"discount_amount": null,
"reward_image_url": "IMAGE_URL_GOES_HERE",
"name": "You've Earned a Free Coffee",
"read_at": null,
"reward_properties": "",
"store_numbers": [],
"franchisee_id": null,
"meta_data": "[{ \"item\" : \"Coffee Club\", \"qty\" : 1, \"type\": \"Beverages\" }]",
"redeemable_created_at": "2019-09-04T16:41:21-05:00",
"reward_id": 9214,
"expiring_at": "2020-12-30T23:59:59-06:00",
"expiring_at_tz": "2020-12-30T23:59:59-06:00",
"redemption_details": null,
"auto_select": true
}
],
"punch_cards": [
{
"progress": [
{
"completed_steps": 0,
"total_steps": 10
}
],
"name": "Punchh product qa test currency",
"description": "",
"image_url": "IMAGE_URL_GOES_HERE",
"icon_url": "IMAGE_URL_GOES_HERE",
"icon_completed_url": "IMAGE_URL_GOES_HERE",
"start_date": "2022-03-09",
"end_date": "2022-03-12",
"gift_reason": "Punchh product qa test currency",
"miscellaneous": "",
"challenge_reach": "segment_auto_enrollment",
"challenge_status": "unavailable",
"challenge_type": "every_x_points",
"occurrence": "single",
"past_completions": 0,
"challenge_expiring_at_tz": "2022-03-12T00:00:00+05:30",
"challenge_id": 124872
},
{
"progress": [
{
"completed_steps": 0,
"total_steps": 5
}
],
"name": "Buy 5 Cheese Breadsticks",
"description": "Buy 5 Cheese Breadsticks",
"image_url": "IMAGE_URL_GOES_HERE",
"icon_url": "IMAGE_URL_GOES_HERE",
"icon_completed_url": "IMAGE_URL_GOES_HERE",
"start_date": "2022-02-08",
"end_date": "2022-02-23",
"gift_reason": "Buy 5 Cheese Breadsticks",
"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_status": "enrolled",
"challenge_type": "receipt_qualification",
"occurrence": "single",
"past_completions": 0,
"challenge_expiring_at_tz": "2022-02-23T00:00:00+05:30",
"challenge_id": 124875
},
{
"progress": [
{
"completed_steps": 0,
"total_steps": 3
}
],
"name": "Buy 4 Breadsticks!",
"description": "Get your 4th Breadstick free",
"image_url": "IMAGE_URL_GOES_HERE",
"icon_url": "IMAGE_URL_GOES_HERE",
"icon_completed_url": "IMAGE_URL_GOES_HERE",
"start_date": "2022-02-08",
"end_date": "2022-02-25",
"gift_reason": "Get your 4th Breadstick free",
"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_status": "enrolled",
"challenge_type": "receipt_qualification",
"occurrence": "multiple",
"past_completions": 0,
"challenge_expiring_at_tz": "2022-02-25T00:00:00+05:30",
"challenge_id": 124876
}
],
"preferred_charities": [
{
"user_donations": {
"reward": {
"user_donations": 0,
"last_donated_item": null,
"last_donation_time": null
},
"currency": {
"user_donations": 3,
"last_donated_item": 1,
"last_donation_time": "2019-07-10T05:28:31-05:00"
}
},
"name": "Ankeney Southview Middle School",
"description": "This is a placeholder text",
"social_cause_id": 13,
"image_url": "IMAGE_URL_GOES_HERE",
"miscellaneous": "",
"city": "Ankeney",
"state": "IA",
"street": "Street",
"zip": "50023",
"phone_number": "",
"email": "",
"address": "ADDRESS_GOES_HERE "
}
],
"account_balance": {
"banked_currency": null,
"banked_currency_expiring_on": null,
"checkins_on_current_card": 0,
"current_membership_level_id": null,
"current_membership_level_expiring_on": null,
"expiring_banked_currency": null,
"pending_points": 0,
"redeemed_cards": null,
"total_loyalty_visits": null,
"unbanked_points": null,
"unredeemed_cards": null,
"current_membership_level_name": null,
"lifetime_points": 117720,
"redeemable_points": 69324,
"membership_qualification_points": 500
}
}