Fetch Gift Card details from Shopify

Pass the customer email to the query to fetch the gift cards for that customer.

The Gift Card Id is generated in NetSuite once the order is fulfilled. The gift card can then be applied to any payment.

Use the following query to fetch gift card details from Shopify:

giftCards(first: 10, query: "abc@xyz.com") {
  edges {
      node {
          id
          initialValue {
              amount
              currencyCode
          }
          order {
              id
              name
              lineItems(first: 10) {
                  edges {
                      node {
                          id
                          title
                          isGiftCard
                          originalUnitPriceSet {
                              shopMoney {
                                  amount
                                  currencyCode
                              }
                          }
                      }
                  }
              }
          }
      }
  }
}                      

Leave a comment

Your email address will not be published. Required fields are marked *