The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Requires access scope.
Note
You need to contact Shopify Support to request the write_gift_cards
and read_gift_cards
access scopes.
A gift card is an alternative payment method. Each gift card has a unique code that is entered during checkout. Its balance can be redeemed over multiple checkouts. Optionally, a gift card can assigned to a specific customer. Gift card codes cannot be retrieved after they're created—only the last four characters can be retrieved.
You can use the GiftCard resource to create, retrieve, and update gift cards for a store. After a gift card is created, only the expiry date, note, and template suffix can be updated.
Note
You can't delete gift cards, but you can disable them. You can't enable gift cards that were previously disabled.
YYYY-MM-DD
format) when the gift card expires. Returns null
if the gift card doesn't have an expiration date.Creates a gift card.
There are additional optional parameters that can be specified in the body of the request when creating a gift card:
Searches for gift cards that match a supplied query. The following fields are indexed by search:
created_at
updated_at
disabled_at
balance
initial_value
amount_spent
email
last_characters
Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.
Updates an existing gift card.
Expiry date, note, and template suffix properties of a gift card can be changed via the API.
A customer ID can only be set if the current value is `null`.