Fetch User Information
Returns a user's details
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- 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.
- Type: stringpunchh
-app -device -id requiredThe app device ID helps Punchh identify each device so that certain rewards can be awarded individually to each device instead of per user. For example, the sign-up reward is given to each device ID to prevent fraudulent sign-ups so that a user cannot do repeated sign-ups from a single device to get rewards. It should not change even if the user resets a device. See the sample code to generate the punchh-app-device-id header.
- Type: stringclientrequired
OAuth client ID provided by the business
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/users/profile \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--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 'punchh-app-device-id: APP_DEVICE_ID_GOES_HERE' \
--data '{
"client": "CLIENT_KEY_GOES_HERE"
}'
{
"access_token": {
"token": "ACCESS_TOKEN_GOES_HERE",
"seconds_to_expire": null,
"revoked_at": null
},
"user": {
"address": "ADDRESS_GOES_HERE",
"avatar_remote_url": null,
"birthday": "1999-01-01",
"communicable_email": "test@example.com",
"city": "Mountain View",
"created_at": "2016-03-16T11:40:07+00:00",
"email": "test@example.com",
"email_verified": false,
"facebook_signup": null,
"favourite_location_ids": "304155",
"favourite_store_numbers": "1023",
"fb_uid": null,
"first_name": "FIRST_NAME_GOES_HERE",
"gender": "male",
"last_name": "LAST_NAME_GOES_HERE",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"migrate_status": false,
"passcode_configured_for_giftcards": false,
"phone": "1111111111",
"profile_field_answers": {
"favorite_sports": "Football",
"favourite": "Arizona Cardinals",
"favs": "Air Force",
"fava": "Academy",
"favb": "Atlanta Hawks",
"favd": "Arizona Diamondbacks",
"fave": "England - Arsenal",
"favf": "Anaheim Ducks"
},
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": "test@example.com",
"state": "California",
"superuser": false,
"terms_and_conditions": false,
"title": null,
"updated_at": "2016-03-21T08:02:44+00:00",
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_code": "P11111111",
"user_id": 111111111,
"user_relations": [
{
"id": 111111111,
"relation": "spouse",
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"birthday": "1999-01-01",
"created_at": "2016-03-18T12:32:13+00:00",
"updated_at": "2016-03-18T12:32:13+00:00"
}
],
"zip_code": "30201",
"anniversary": "2013-07-13",
"verification_mode": null,
"apple_signup": null,
"apple_uid": null,
"has_generated_fb_email": false,
"sms_subscription": true,
"apple_pass_url": "APPLE_PASS_URL_GOES_HERE",
"google_pass_url": "GOOGLE_PASS_URL_GOES_HERE",
"age_verified_status": true,
"account_created_at": "2020-03-27T04:34:35-05:00",
"user_joined_at": "2016-03-16T11:40:07+00:00"
}
}