giftCardUpdate mutation
Update a gift card.
Required access
write_gift_cards
access scope. Also: The API client must be a private or custom app installed on a Shopify Plus store.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the gift card to be updated. |
input
(
GiftCardUpdateInput!
)
required
|
The updated properties for the gift card. |
GiftCardUpdateInput fields
-
customerId (
ID
)The customer associated with the gift card.
-
expiresOn (
Date
)The date when the gift card will expire.
-
note (
String
)A description of the gift card, which isn't visible to customers.
-
templateSuffix (
String
)The suffix of the Liquid template that's used to render the gift card online. For example, if the value is
birthday
, then the gift card is rendered using the templategift_card.birthday.liquid
. When the argument is not supplied, the defaultgift_card.liquid
template is used.
Return fields
-
giftCard (
GiftCard
)The updated gift card.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Update a gift card.
Required access
write_gift_cards
access scope. Also: The API client must be a private or custom app installed on a Shopify Plus store.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the gift card to be updated. |
input
(
GiftCardUpdateInput!
)
required
|
The updated properties for the gift card. |
GiftCardUpdateInput fields
-
customerId (
ID
)The customer associated with the gift card.
-
expiresOn (
Date
)The date when the gift card will expire.
-
note (
String
)A description of the gift card, which isn't visible to customers.
-
templateSuffix (
String
)The suffix of the Liquid template that's used to render the gift card online. For example, if the value is
birthday
, then the gift card is rendered using the templategift_card.birthday.liquid
. When the argument is not supplied, the defaultgift_card.liquid
template is used.
Return fields
-
giftCard (
GiftCard
)The updated gift card.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Update a gift card.
Required access
write_gift_cards
access scope. Also: The API client must be a private or custom app installed on a Shopify Plus store.
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
Arguments
Argument | Description |
---|---|
id
(
ID!
)
required
|
The ID of the gift card to be updated. |
input
(
GiftCardUpdateInput!
)
required
|
The updated properties for the gift card. |
GiftCardUpdateInput fields
-
customerId (
ID
)The customer associated with the gift card.
-
expiresOn (
Date
)The date when the gift card will expire.
-
note (
String
)A description of the gift card, which isn't visible to customers.
-
templateSuffix (
String
)The suffix of the Liquid template that's used to render the gift card online. For example, if the value is
birthday
, then the gift card is rendered using the templategift_card.birthday.liquid
. When the argument is not supplied, the defaultgift_card.liquid
template is used.
Return fields
-
giftCard (
GiftCard
)The updated gift card.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.