Save Gift Card

Saves a gift card for a user.

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 details to save the gift card.

  • cardNumber
    Type: string
    min length:  
    1
    required

    The gift card number to save.

  • userId
    Type: string
    min length:  
    1
    required

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

  • amount
    Type: string | null

    The original issued amount for the card. Optional.

  • balanceAmount
    Type: string | null

    The current balance amount on the card. Optional.

  • isPreferred
    Type: boolean

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

  • passcode
    Type: string | null

    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"
}'
{
  "giftCardId": "01JNXXXXXXXXXXXXXXXXXXXXXX"
}