GiftCards
Returns a list of gift cards. Requires read_gift_cards access scope. Also, note that the API client must be a private or custom application installed on a Shopify Plus or Shopify Plus Partner Sandbox store. (This table is available only with a ShopifyPlus subscription)
Table-Specific Information
Note: Access to the GiftCards table is restricted to Shopify accounts with Shopify Plus membership. If your account does not include this tier, the table may return an empty result set or indicate that the resource is unavailable.
Select
The driver uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The driver processes other filters client-side within the driver.
- Id supports the '=, IN' comparison operators.
- ExpiresOn supports the '=, !=, <, >, >=, <=' comparison operators.
- CreatedAt supports the '=, !=, <, >, >=, <=' comparison operators.
- InitialValueAmount supports the '=, !=, <, >, >=, <=' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM GiftCards WHERE Id = 'Val1'
SELECT * FROM GiftCards WHERE ExpiresOn = '2023-01-01'
SELECT * FROM GiftCards WHERE CreatedAt = '2023-01-01 11:10:00'
SELECT * FROM GiftCards WHERE InitialValueAmount = '100.00'
Insert
The following columns can be used to create a new record:
Note, ExpiresOn, InitialValueAmount, CustomerId, RecipientAttributesRecipientId, RecipientAttributesPreferredName, RecipientAttributesMessage, RecipientAttributesSendNotificationAt
Update
The following columns can be updated:
Note, ExpiresOn, CustomerId, RecipientAttributesRecipientId, RecipientAttributesPreferredName, RecipientAttributesMessage, RecipientAttributesSendNotificationAt, Enabled
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
A globally-unique ID. | |
| Enabled | Bool | True |
Whether the gift card is enabled. | |
| Note | String | False |
The note associated with the gift card, which is not visible to the customer. | |
| ExpiresOn | Date | False |
The date at which the gift card will expire. | |
| LastCharacters | String | True |
The final four characters of the gift card code. | |
| MaskedCode | String | True |
The gift card code. Everything but the final four characters is masked. | |
| DeactivatedAt | Datetime | True |
The date and time at which the gift card was deactivated. | |
| UpdatedAt | Datetime | True |
The date and time at which the gift card was updated. | |
| CreatedAt | Datetime | True |
The date and time at which the gift card was created. | |
| BalanceAmount | Decimal | True |
Decimal money amount. | |
| BalanceCurrencyCode | String | True |
Currency of the money. | |
| InitialValueAmount | Decimal | True |
Decimal money amount. | |
| InitialValueCurrencyCode | String | True |
Currency of the money. | |
| CustomerId | String | False |
A globally-unique ID. | |
| RecipientAttributesRecipientId | String | False |
A globally-unique ID. | |
| RecipientAttributesPreferredName | String | False |
The preferred name of the recipient who will receive the gift card. | |
| RecipientAttributesMessage | String | False |
The message sent with the gift card. | |
| RecipientAttributesSendNotificationAt | Datetime | False |
The scheduled datetime on which the gift card will be sent to the recipient. The gift card will be sent within an hour of the specified datetime. | |
| OrderId | String | True |
A globally-unique ID. |