Update Gift Card

​

Enables a gift card owner to update the name, design, and preference of a gift card

Path Parameters

  • Unique ID of the gift card issued by and maintained in the Punchh system.

Headers

  • The signature for the API call

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

  • Preferred language

  • Advertises which content types the client is able to understand

  • Set this header to application/json.

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

Body

application/json
  • Whether auto-reload is enabled for a gift card or not

  • OAuth client ID provided by the business

  • Default amount with which a gift card would be auto-reloaded

  • 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.

  • Name assigned to a gift card by the gift card owner

  • UUID of a payment card

  • A "true" value for a gift card indicates that the gift card owner has selected it to be the preferred gift card for payment.

  • Threshold amount below which a gift card would be eligible for auto-reload

Responses

  • application/json
  • application/json
Request Example for put/api2/mobile/gift_cards/{uuid}
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"
}