Hi, will there soon be a way to get more information about a purchased gift card from the order GraphQL query? Or at least from the fulfilments query?
We need this in order to generate an invoice for the gift card sale — we don’t need any information about whether the card has been used.
Or, for example, could it be made possible to filter the GiftCards query by the order.id?
Thanks in advance
Hello MilekNP, You’re right at the moment, Shopify’s GraphQL Admin API doesn’t expose detailed gift card info directly through the order or fulfillment queries. The data separation is intentional for security reasons, but there are still a couple of reliable workarounds:
-
Cross-reference via GiftCard API – You can use the GiftCards query and match by note, customer, or even the created date range of the order to locate the corresponding card record.
-
Store custom data at purchase – When a gift card is generated (through a custom app or checkout script), you can save the giftCard.id or code in the order’s metafields. That way, you’ll always have a reference for reporting or invoicing later.
-
Automated invoice generation – Some stores handle this by using a webhook (orders/paid) that triggers a custom script to log both order + gift card details into a reporting app or Google Sheet.
If you’d like, I can take a quick look at your current workflow or setup and show how to link the data cleanly