Update Saved Gift Card

Updates the IsPreferred flag of a saved gift card for a specific user, allowing them to set or change their preferred gift card.

Headers
  • x-applicationSource
    Type: string
    required

    A custom HTTP header that accepts a free-form string value. It is used to identify the application making the API request. For example, if Punchh invokes the API, the value could be "punchh".

  • X-LocationId
    Type: string
    required

    The unique location identifier for the store or business location processing the transaction.

  • Content-Type
    Type: string
    required

    The media type of the request body. Must be set to application/json.

  • Authorization
    Type: string
    required

    Bearer token for API authorization. Send in the format: Bearer ACCESS_TOKEN_GOES_HERE.

Body·
application/json

Request body containing the Id, UserId and new IsPreferred value.

  • id
    Type: string | null

    The unique identifier of the saved gift card to update.

  • isPreferred
    Type: boolean

    Indicates whether the gift card should be set as the preferred card.

  • userId
    Type: string | null

    The unique identifier of the user in your system who owns the saved gift card.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/giftcard/v1/giftcards
curl https://SERVER_NAME_GOES_HERE.partech.com/giftcard/v1/giftcards \
  --request PATCH \
  --header 'x-applicationSource: ' \
  --header 'X-LocationId: ' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --data '{
  "id": "SAVED_GIFT_CARD_ID_GOES_HERE",
  "userId": "USER_ID_GOES_HERE",
  "isPreferred": true
}'
{
  "recordCount": 1,
  "data": {
    "id": "SAVED_GIFT_CARD_ID_GOES_HERE"
  },
  "errors": null,
  "traceId": "00-abcdef1234567890-abcdef12-01",
  "statusCode": 200
}