GiftCard Object
A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes.
type GiftCard implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(
key: String!
): String
privateMetafields(
keys: [String!]
): Metadata
metadata: [MetadataItem!]!
metafield(
key: String!
): String
metafields(
keys: [String!]
): Metadata
displayCode: String!
last4CodeChars: String!
code: String!
created: DateTime!
createdBy: User
usedBy: User @deprecated
createdByEmail: String
usedByEmail: String @deprecated
lastUsedOn: DateTime
expiryDate: Date
app: App
product: Product
events(
filter: GiftCardEventFilterInput
): [GiftCardEvent!]!
tags: [GiftCardTag!]!
boughtInChannel: String
isActive: Boolean!
initialBalance: Money!
currentBalance: Money!
user: User @deprecated
endDate: DateTime @deprecated
startDate: DateTime @deprecated
}
Fields
id ● ID!
ID of the gift card.
privateMetadata ● [MetadataItem!]!
List of private metadata items. Requires staff permissions to access.
privateMetafield ● String
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
privateMetafields ● Metadata
Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
metadata ● [MetadataItem!]!
List of public metadata items. Can be accessed without permissions.
metafield ● String
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
key ● String!
metafields ● Metadata
Public metadata. Use keys to control which fields you want to include. The default is to include everything.
keys ● [String!]
displayCode ● String!
Code in format which allows displaying in a user interface.
last4CodeChars ● String!
Last 4 characters of gift card code.
code ● String!
Gift card code. It can be fetched both by a staff member with 'MANAGE_GIFT_CARD' when gift card hasn't been used yet or a user who bought or issued the gift card.
created ● DateTime!
Date and time when gift card was created.
createdBy ● User
The user who bought or issued a gift card.
createdByEmail ● String
Email address of the user who bought or issued gift card.
lastUsedOn ● DateTime
Date and time when gift card was last used.
expiryDate ● Date
Expiry date of the gift card.
app ● App
App which created the gift card.
product ● Product
Related gift card product.
events ● [GiftCardEvent!]!
List of events associated with the gift card.
filter ● GiftCardEventFilterInput
Filtering options for gift card events.
tags ● [GiftCardTag!]!
The gift card tag.
boughtInChannel ● String
Slug of the channel where the gift card was bought.
isActive ● Boolean!
initialBalance ● Money!
currentBalance ● Money!
Show deprecated
Interfaces
Node
An object with an ID
ObjectWithMetadata
Returned By
giftCard query
Member Of
Checkout object ● GiftCardActivate object ● GiftCardAddNote object ● GiftCardBulkCreate object ● GiftCardCountableEdge object ● GiftCardCreate object ● GiftCardCreated object ● GiftCardDeactivate object ● GiftCardDelete object ● GiftCardDeleted object ● GiftCardMetadataUpdated object ● GiftCardResend object ● GiftCardSent object ● GiftCardStatusChanged object ● GiftCardUpdate object ● GiftCardUpdated object ● Order object