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

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

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

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

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

Body·

application/json

Request details to save the gift card.

  • The gift card number to save.

  • The unique identifier of the user for whom the card is being saved.

  • The original issued amount for the card. Optional.

  • The current balance amount on the card. Optional.

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

  • When true, marks this card as the user's preferred gift card.

  • The passcode associated with the gift card. Optional.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/giftcard/v1/savegiftcard
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"
}