Gift Card

Create GiftCard

Creates a gift card for a specific user.

Warning

ℹ️️ The redemptionCode field for a gift card is auto-generated on the creation and cannot be set to an arbitrary value.

post/giftcards

Headers

Content-Typestring required

Type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Response

OK

idstring required

Gift card identification.

redemptionTokenstring required

Gift card redemption token.

redemptionCodestring required

Gift card redemption code.

balanceinteger required

Gift card current balance. For Gift Cards newly created, the balance will be 0.0.

relationNamestring required

Field to be filled in when it is not necessary to use a loyalty program for the gift card. Observation: A new relationNamevalue is required for each new gift card to be created.

emissionDatestring required

Gift card emission date.

expiringDatestring required

Gift card expiration date.

captionstring required

Field to be filled in if a loyalty program must be created for the Gift Card.

currencyCodestring

Currency code in ISO 4217.

Example response

{
  "id": "954",
  "redemptionToken": "32ScL57220Vapb8pc50HJ3mWH1cl1L8x",
  "redemptionCode": "***********ASDQ",
  "relationName": "cardName",
  "emissionDate": "2014-04-24T20:22:58.163",
  "expiringDate": "2016-01-01T00:00:00",
  "caption": "Programa Vtex Fidelidade",
  "currencyCode": "USD",
  "transactions": {
    "href": "cards/954/transactions"
  }
}

Changes