Save Gift Card
Saves a gift card for a user. An optional designId records which artwork the customer selected; it is a presentation attribute with no effect on payment processing.
If the customer already holds the card, no duplicate is created. The design is updated when designId is supplied and preserved when omitted.
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 details to save the gift card.
- Type: stringcard
Number min length:1requiredThe gift card number to save.
- Type: stringuser
Id min length:1requiredThe unique identifier of the user for whom the card is being saved.
- Type: string | nullamount
The original issued amount for the card. Optional.
- Type: string | nullbalance
Amount The current balance amount on the card. Optional.
- Type: stringdesign
Id max length:100Optional presentation identifier recording which artwork the user selected. It has no effect on payment processing and is never sent to the payment gateway. Only a length limit applies; the value is stored and returned exactly as submitted. Saving a card the user already holds updates the design when supplied and preserves the existing design when omitted; no duplicate card is created.
- Type: booleanis
Preferred When true, marks this card as the user's preferred gift card.
- Type: string | nullpasscode
The passcode associated with the gift card. Optional.
Responses
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.partech.com/giftcard/v1/savegiftcard \
--request POST \
--header 'x-applicationSource: ' \
--header 'X-LocationId: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"cardNumber": "GIFT_CARD_NUMBER_GOES_HERE",
"passcode": "GIFT_CARD_PASSCODE_GOES_HERE",
"balanceAmount": "100.00",
"amount": "100.00",
"isPreferred": false,
"userId": "user-123",
"designId": "birthday-balloons"
}'
{
"giftCardId": "01JNXXXXXXXXXXXXXXXXXXXXXX"
}