Update Saved Gift Card
Updates the preference, design, and/or active status of a saved gift card.
The isPreferred, designId, and isActive fields are optional and independent. A client may update any one of them on its own.
designId Update Rules
| Value Sent | Effect |
|---|---|
| (omitted) | Stored design is unchanged |
"" (empty string) |
Stored design is removed |
| Any other value | Stored design is replaced |
isPreferred Update Rules
| Value Sent | Effect |
|---|---|
| (omitted) | Stored preference is unchanged |
true |
Card is set as preferred |
false |
Card is set as not-preferred |
isActive Update Rules
| Value Sent | Effect |
|---|---|
| (omitted) | Stored active status is unchanged |
true |
Card is set as active in the wallet |
false |
Card is set as inactive in the wallet |
Active status is tracked per saved gift card, per customer wallet, and only affects this wallet-level association — it does not change the state of the underlying gift card.
Headers
- 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.
Body·
Request body containing the id, userId, and optional isPreferred, designId, and isActive values.
- Type: stringidrequired
The unique identifier of the saved gift card to update.
- Type: stringuser
Id requiredThe unique identifier of the user in your system who owns the saved gift card.
- Type: stringdesign
Id max length:100Optional presentation identifier. If omitted, the existing design remains unchanged. Sending an empty string removes the stored design. Any other value replaces the stored design. This parameter is independent of
isPreferred; either parameter can be updated independently. - Type: booleanis
Active Indicates whether the saved gift card should be set as active or inactive in the wallet. If omitted, the existing active status remains unchanged. This parameter is independent of
isPreferredanddesignId; any of them can be updated independently.Wallet-Level Only: Updating
isActivetofalsedeactivates the card in the customer's wallet; it does not delete the card or affect the physical/processor card balance.Passing invalid non-boolean types (e.g.,
"yes",1) will return a422 Unprocessable Entity. - Type: booleanis
Preferred Indicates whether the gift card should be set as the preferred card. If omitted, the existing preference remains unchanged.
Responses
- application/json
- 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,
"designId": "new-year-fireworks",
"isActive": true
}'
{
"recordCount": 1,
"data": {
"id": "SAVED_GIFT_CARD_ID_GOES_HERE"
},
"errors": null,
"traceId": "00-abcdef1234567890-abcdef12-01",
"statusCode": 200
}