post https://{accountName}.{environment}.com.br/api/giftcards
Warning
- The field
profileId
should be filled with a value that identifies the client. It can be the ID itself or the client's e-mail. - The field
expiringDate
should be filled in ISO 8601 formatYYYY-MM-DDThh:mm:ss.fff
The
redemptionCode
field for a Gift Card is auto-generated on creation and cannot be set to an arbitrary value.
Response body has the following properties:
Name | Type | Mandatory | Description |
---|---|---|---|
id |
string | Yes | Gift card id |
redemptionToken |
string | Yes | |
redemptionCode |
string | Yes | |
balance |
decimal | Gift card current balance. For Gift Cards newly created, the balance will be 0.0 | |
relationName |
string | Field to be filled in when it is not necessary to use a loyalty program for the Gift Card. Observation: A new relationName value is required for each new Gift Card to be created. |
|
emissionDate |
string | ||
expiringDate |
string | ||
caption |
string | Field to be filled in if a loyalty program must be created for the Gift Card. | |
transaction |
object | ||
↳ href |
string | Resource URL |
Response body example:
{
"id": "[email protected]_7",
"redemptionToken": "YIRV-NGSR-ECBY-DBBF",
"redemptionCode": "YIRV-NGSR-ECBY-DBBF",
"balance": 122.1000,
"relationName": "",
"emissionDate": "2020-07-30T15:04:42.6432065Z",
"expiringDate": "2020-09-01T13:15:30Z",
"caption": "VTEX Fidelidade",
"provider": "",
"groupName": "",
"transaction": {
"href": "/accountname/giftcards/[email protected]_7/transactions"
}
}