# The Giftcard Object

| <p><strong>id</strong> <code>string</code></p><p>Unique ID for the giftcard.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |          |                                                                                                                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>shortId</strong> <code>string</code></p><p>Short unique ID for the giftcard.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>accessToken</strong> <code>string</code></p><p>Token that you will need to act on this giftcard.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>balance</strong> <code>int</code></p><p>The current balance (money amount) of the giftcard. Think of it as an account balance for the giftcard; it indicates the remaining money amount left on the giftcard.<br>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>availableBalance</strong> <code>int</code></p><p>The available balance (money amount) of the giftcard. This is like the <code>balance</code>, but it regards transactions on the giftcard that are currently on hold. In contrary, the <code>balance</code> only reflects confirmed transactions. The available balance indicates the funds currently available for redeeming. You cannot redeem a giftcard with an amount exceeding this amount.</p><p>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).</p>                                                                                                                                                                                                                                                                                                                                                                                     |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>initialAmount</strong> <code>int</code></p><p>The initial (starting amount) of the giftcard. This is a static value that never changes.</p><p>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>activation</strong> <code>object</code><br>A sub-object with a context that sets parameters for how this giftcard can be activated (sale). See <a href="#giftcard-activation-context">Giftcard Activation Context</a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>currency</strong> <code>string</code></p><p><a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes">ISO 4217 - Alphabetic code, 3 characters</a>. For example 'EUR' for Euro, 'USD' for U.S. Dollar., etc..</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>expectedAction</strong> <code>string</code></p><p>The (next) action that is allowed and expected on this giftcard. This is any one value of <code>\[ "activate"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | "redeem" | "none" ]</code>.<br>If <code>"activate"</code>, then the giftcard is ready to be sold.<br>If this value is <code>"redeem"</code>, then the giftcard is ready to be used.<br>If this value is <code>"none"</code> then no further transactions can be performed on this giftcard.</p> |
| <p><strong>authorizedActions</strong> <code>list of strings</code></p><p>A list of actions that you as the API consumer are allowed to perform on this giftcard. Possible elements in this list are <code>"activate"</code> and <code>"redeem"</code>.</p><p>If <code>"activate"</code> is a member of this list, then the API is signaling you that you are authorized to activate this giftcard. If the <code>expectedAction</code> field on this giftcard also has a value of <code>"activate"</code>, you can move to <a href="gift_cards_activate">activate the gift card</a>.<br>If <code>"redeem"</code> is a member of this list, then the API is signaling you that you are authorized to redeem this giftcard. If the <code>expectedAction</code> field on this giftcard also has a value of <code>"redeem"</code>, you can move to <a href="../transactionintents/create-a-transaction-intent">redeem this gift card by starting a transaction intent</a>.</p> |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>issuedByZmyle</strong> <code>bool</code><br>Indicates if this giftcard was issued by zmyle or not. If <code>true</code> (issued by zmyle), then the funds for this giftcard are also managed by zmyle. If <code>false</code> then the giftcard funds are managed by the retailer themselves.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>transactions</strong> <code>list of objects</code></p><p>A list of <a href="../transactions/the-gift-card-transaction-object">transactions</a> that have occurred on this giftcard.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |          |                                                                                                                                                                                                                                                                                      |
| <p><strong>campaignBoost</strong> <code>object</code> <em>optional</em><br>Info on a giftcard campaign. This sub-object is optional and is only present if this giftcard is eligible to receive a balance-boost from an active giftcard campaign. See <a href="#giftcard-campaign-boost-info">Giftcard Campaign Boost Info</a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |          |                                                                                                                                                                                                                                                                                      |

### Giftcard Activation Context

| Giftcard Activation Context                                                                                                                                                                                                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>isDynamicAmount</strong> <code>bool</code><br>Identifies if this giftcard allows activations with custom amounts. </p>                                                                                                                                                       |
| <p><strong>amount</strong> <code>int</code><br>The proposed, initial amount of the gift card.</p><p>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).<br>Set to 0 for giftcards that allow dynamic activation amounts.</p> |
| <p><strong>minAmount</strong> <code>int</code><br>The min. amount that this giftcard can be activated with.</p><p>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).</p>                                                    |
| <p><strong>maxAmount</strong> <code>int</code><br>The max. amount that this giftcard can be activated with.</p><p>A positive integer representing a money amount in the smallest currency unit (say 100 cents instead of 1 EUR).</p>                                                    |

### Giftcard Campaign Boost Info

| Giftcard Campaign Boost Info                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>campaignId</strong> <code>string</code><br>The ID of the campaign.</p>                                                                                                                                                                                         |
| <p><strong>boostFlavorId</strong> <code>string</code><br>The ID of the specific boost.</p>                                                                                                                                                                                |
| <p><strong>currency</strong> <code>string</code><br><a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes">ISO 4217 - Alphabetic code, 3 characters</a>. For example 'EUR' for Euro, 'USD' for U.S. Dollar., etc..</p>                                             |
| <p><strong>hasFunds</strong> <code>bool</code><br>Indicates if this campaign still has funds.</p>                                                                                                                                                                         |
| <p><strong>rate</strong> <code>number</code><br>Percentage for boost amount (0.0 .. 1.0). Multiplied by the activation amount of the giftcard. Combined with <code>fixed</code> is the total boost amount.</p>                                                            |
| <p><strong>fixed</strong> <code>int</code><br>Fixed money amount for boost amount. Combined with <code>rate</code> is the total boost amount.</p>                                                                                                                         |
| <p><strong>minBoostAmount</strong> <code>int</code><br>The minimum balance boost amount, as a lower bound.</p>                                                                                                                                                            |
| <p><strong>maxBoostAmount</strong> <code>int</code><br>The maximum balance boost amount, as an upper bounds.</p>                                                                                                                                                          |
| <p><strong>minCreditAmount</strong> <code>int</code><br>The minimum activation amount that this campaign applies to, as a lower bound.</p>                                                                                                                                |
| <p><strong>maxCreditAmount</strong> <code>int</code><br>The maximum activation amount that this campaign applies to, as an upper bound.</p>                                                                                                                               |
| <p><strong>startDate</strong> <code>string</code><br>Campaign start date.<br>Dates are strings in ISO-8601 format <code>yyyyMMdd'T'hhmmss'Z'</code> and are always in UTC.</p>                                                                                            |
| <p><strong>endDate</strong> <code>string</code><br>Campaign end date.<br>Dates are strings in ISO-8601 format <code>yyyyMMdd'T'hhmmss'Z'</code> and are always in UTC.</p>                                                                                                |
| <p><strong>giftcardFundsExpireAt</strong> <code>date</code> <em>optioanl</em><br>Date at which the boost amount would expire if the giftcard funds remain untouched.<br>Dates are strings in ISO-8601 format <code>yyyyMMdd'T'hhmmss'Z'</code> and are always in UTC.</p> |
| <p><strong>teaser</strong> <code>string</code> <em>optional</em><br>Teaser text for the campaign.</p>                                                                                                                                                                     |
| <p><strong>legalInfo</strong> <code>string</code> <em>optional</em><br>Legal information for the campaign.</p>                                                                                                                                                            |
