Transfer Loyalty Reward
Enables a user to transfer a loyalty reward from their account to another user's account by specifying the recipient's email address or phone number and the reward ID to transfer.
The recipient must be an existing member in the loyalty system. The transfer is subject to the business's configured transfer limits, including maximum transfer limits per account and daily receiving limits for the recipient.
Prerequisite
Peer-to-peer rewards transfers must be enabled for the business. Contact your Punchh representative to update this Punchh platform configuration.
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringContent
- Type requiredSet this header to application/json.
- 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.
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
Body
- Type: stringaccess
_token requiredToken issued to the user after logging into the app of the business
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: stringpasswordrequired
Password of the user initiating the transfer. Required for peer-to-peer transfer.
- Type: numberreward
_to _transfer requiredID of the reward to transfer to the recipient
- Type: stringrecipient
_email Email address of the recipient to whom the loyalty reward will be transferred.
Note: Eitherrecipient_emailorrecipient_identifieris required. When bothrecipient_identifierandrecipient_emailare provided,recipient_identifiertakes precedence. - Type: stringrecipient
_identifier Accepts either an email address or a phone number to identify the recipient of the reward transfer.
recipient_identifieris the primary parameter used to identify the recipient. The system automatically detects whether the provided value is an email address or a phone number.
Note: Eitherrecipient_emailorrecipient_identifieris required. When bothrecipient_identifierandrecipient_emailare provided,recipient_identifiertakes precedence.- If a valid phone number or email matches a single guest account, the transfer proceeds.
- If a phone number matches multiple guest accounts, the transfer is blocked, and an error is returned. To prevent duplicate phone number error, we recommend enabling phone number uniqueness for the business. Contact your Punchh representative to update this Punchh platform configuration.
- If no matching guest is found for the provided email or phone number, a "recipient not found" error is returned.
Responses
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/loyalty_transfers/reward \
--request POST \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Content-Type: application/json' \
--header 'Accept-Language: en' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"access_token": "ACCESS_TOKEN_GOES_HERE",
"recipient_email": "recipient@example.com",
"recipient_identifier": "recipient@example.com",
"reward_to_transfer": "73786533580",
"password": "PASSWORD_GOES_HERE"
}'
[
"Base Redeemable transferred to Recipient Name"
]