Find User (Redemptions 2.0)
This API endpoint is used for guest user identification. Both lookup_field and lookup_value are passed as request parameters to look up the user account. The response includes user profile information.
Headers
- 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 requiredFor details, see User Agent.
Body
application/json
- Type: stringclientrequired
Client key of the business
- Type: stringlookup
_field requiredField (e.g., phone, email, etc.) used to look up the user account. Accepted values are:
- phone - User's phone number
- email - User's email address
- otp - Single-scan code generated by mobile API for user identification
- none - Anonymous guest flow handling. If you pass the "none" value in the
lookup_fieldrequest parameter and the "anonymous" value in thelookup_valuerequest parameter, a new guest user will be created with a user ID and a dummy email ID in Punchh (returned in the API response). - user_as_qrcode - User's QR code identification in loyalty account
- user_token - User's authentication
- apple_nfc_data - User identifier that enables look-up of user information generated from the Apple Pass
- nfc_token - User identifier that enables the look-up of user information generated from the Google Pass
- Type: stringlookup
_value requiredValue of the look-up field (phone number, email address, etc.). Example values:
- phone - 1111111111
- email - test@example.com
- otp - 111111
- none - anonymous
- user_as_qrcode - <QR_CODE_GOES_HERE>
- user_token - <TOKEN_GOES_HERE>
- apple_nfc_data - <TOKEN_GOES_HERE>
- nfc_token - <TOKEN_GOES_HERE>
Responses
- application/json
- application/json
- application/json
- 412
Invalid Signature
- application/json
Request Example for get/api/auth/users/find
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/users/find \
--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' \
--data '{
"lookup_field": "phone",
"lookup_value": "1111111111",
"client": "CLIENT_GOES_HERE"
}'
{
"address_line1": "ADDRESS_GOES_HERE",
"anniversary": null,
"avatar_remote_url": null,
"birthday": null,
"city": "",
"created_at": "2016-10-10T07:19:19Z",
"email": "test@example.com",
"email_verified": false,
"fb_uid": "",
"first_name": "FIRST_NAME_GOES_HERE",
"gender": "",
"id": 111111111,
"last_name": "LAST_NAME_GOES_HERE",
"state": "",
"updated_at": "2017-10-11T16:03:19Z",
"zip_code": "25110",
"allow_multiple": true,
"authentication_token": "AUTHENTICATION_TOKEN_GOES_HERE",
"favourite_locations": "308052",
"favourite_store_numbers": "2310",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"passcode_configured": false,
"referral_code": "REFERRAL_CODE_GOES_HERE",
"referral_path": "URL_GOES_HERE",
"secondary_email": "",
"terms_and_conditions": false,
"title": "",
"user_as_barcode": "1111111",
"user_as_qrcode": "QR_CODE_GOES_HERE",
"user_code": "P11111111",
"user_id": 111111111,
"user_relations": [],
"wants_menu_notifications": false,
"work_zip_code": null,
"mindbody_client_id": null,
"preferred_locale": "en",
"phone": "",
"migrate_status": false,
"email_unsubscribe": false,
"allow_push_notifications": true,
"facebook_signup": false,
"communicable_email": "test@example.com",
"access_token": null,
"expiration_date": "2018-07-31",
"user_joined_at": "2022-11-01T19:17:44Z",
"age_verified_status": true
}