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.
- Type: stringx
-application Source requiredA 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".
- Type: stringX
- Location Id requiredThe unique location identifier for the store or business location processing the transaction.
- Type: stringContent
- Type requiredThe media type of the request body. Must be set to
application/json. - Type: stringAuthorizationrequired
Bearer token for API authorization. Send in the format:
Bearer ACCESS_TOKEN_GOES_HERE.
Request body containing the Id, UserId and new IsPreferred value.
- Type: string | nullid
The unique identifier of the saved gift card to update.
- Type: booleanis
Preferred Indicates whether the gift card should be set as the preferred card.
- Type: string | nulluser
Id The unique identifier of the user in your system who owns the saved gift card.
- application/json
- application/json
- application/json
- application/json
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
}