Update Gift Card
Enables a gift card owner to update the name, design, and preference of a gift card
- Type: stringuuidrequired
Unique ID of the gift card issued by and maintained in the Punchh system.
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringAccept
- Language Preferred language
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- 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: booleanauto
_reload _enabled Whether auto-reload is enabled for a gift card or not
- Type: stringclient
OAuth client ID provided by the business
- Type: numberFormat: floatdefault
_amount Default amount with which a gift card would be auto-reloaded
- Type: integerdesign
_id ID of a particular gift card design selected by the gift card owner while purchasing a gift card
Note: As Punchh no longer supports updating the design ID of the gift card via the Update Gift Card API, the parameter is marked deprecated. It will be removed from the request body of the API topic.
- Type: stringname
Name assigned to a gift card by the gift card owner
- Type: stringpayment
_card _id UUID of a payment card
- Type: booleanpreferred
A "true" value for a gift card indicates that the gift card owner has selected it to be the preferred gift card for payment.
- Type: numberFormat: floatthreshold
_amount Threshold amount below which a gift card would be eligible for auto-reload
- application/json
- application/json
curl 'https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/gift_cards/{uuid}' \
--request PUT \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Accept-Language: en' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE",
"name": "My first card",
"preferred": true,
"auto_reload_enabled": true,
"threshold_amount": 50,
"default_amount": 50,
"payment_card_id": "PAYMENT_CARD_UUID_GOES_HERE"
}'
{
"card_background_image": "IMAGE_URL_GOES_HERE",
"design_id": 1,
"preferred": true,
"name": "My first card",
"usb_scannable_card_number": "CARD_NUMBER_GOES_HERE",
"users": [
{
"state": "owner",
"email": "test@example.com",
"first_name": null,
"last_name": null,
"avatar_remote_url": null,
"fb_uid": null,
"user_id": 111111111
}
],
"card_number": "CARD_NUMBER_GOES_HERE",
"epin": "EPIN_GOES_HERE",
"created_at": "2016-06-13T12:42:21-07:00",
"last_fetched_amount": 0,
"last_fetched_at": "2016-06-13T12:42:21-07:00",
"status": "active",
"updated_at": "2016-06-13T12:42:21-07:00",
"uuid": "ID_GOES_HERE",
"gift_card_id": "ID_GOES_HERE",
"auto_reload_enabled": true,
"gc_user_auto_reload_threshold_amount": 50,
"gc_user_auto_reload_default_amount": 50,
"gc_user_auto_reload_preferred_payment": "PAYMENT_CARD_UUID_GOES_HERE"
}