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 in addition to the user ID.
Headers
- Type: stringAuthorizationrequired
This is a combination of unique API location key as well as business key (UUID) as the Authorization header.
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredFor details, see User Agent.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
Body
application/json
- 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). - reward_id - Not recommended
- redemption_code - Not recommended
- 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. See Implement Apple Pass Integration With POS
- nfc_token - User identifier that enables the look-up of user information generated from the Google Pass. See Implement Google Pass Integration With POS
- 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
- reward_id - <REWARD_ID_GOES_HERE>
- redemption_code - <REDEMPTION_CODE_GOES_HERE>
- 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
- application/json
Request Example for get/api/pos/users/find
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/pos/users/find \
--header 'Authorization: Token token=LOCATION_KEY_GOES_HERE, btoken=BUSINESS_KEY_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'User-Agent: IntegratorName/IntegrationType/VersionNumber' \
--header 'Accept: application/json' \
--data '{
"lookup_field": "phone/otp/none/",
"lookup_value": "<phone_number>/<single_scan_code>/anonymous/"
}'
{
"user_id": 11111111,
"business_id": 27,
"phone": "1111111111",
"email": "test@example.com",
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"payment_mode": "GiftCard",
"selected_card_number": "CARD_NUMBER_GOES_HERE",
"loyalty_cards": [
null
],
"selected_tip_amount": 1,
"external_uid": "EXTERNAL_UID_GOES_HERE",
"locked": false
}