Consolidate Gift Cards

​

Enables a user to transfer the entire balance of a gift card to another gift card. If the card consolidation feature is disabled for the brand in the Punchh platform, the API returns a 422 error. Contact your Punchh representative to update this Punchh platform configuration.

Note: After the balance transfer, the system removes the source gift card from the user's timeline and changes its status to 'closed' for the owner. Additionally, access is revoked for all users with whom the gift card was shared. Currently, this is applicable only to Givex and Heartland gift card providers.

Path Parameters

  • Unique ID of the destination gift card to which the entire balance will be transferred

Headers

  • The signature for the API call

  • Set this header to application/json.

  • Preferred language

  • Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

  • Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE.

Body

application/json
  • Access token of the user

  • OAuth client ID provided by the business

  • UUID of the source gift card from which the entire balance will be transferred

Responses

  • application/json
  • application/json
  • Please turn on <config_key> in Mobile Configuration before performing this gift card action.

Request Example for patch/api2/mobile/gift_cards/{uuid}/consolidate
curl 'https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/gift_cards/{uuid}/consolidate' \
  --request PATCH \
  --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",
  "source_card": "CARD_GOES_HERE"
}'
{
  "source_card": {},
  "destination_card": {}
}