Gift card id in order

BLC-Nicolas
New Member
8 0 0

Hi guys,

 

We would like to get the id of the gift card used in an order.

 

Thanks for the help!

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hi @BLC-Nicolas ,

 

If you are using the REST Admin API, in your Order.json object you can get the Gift Card ID as well as the last 4 characters of the Gift Card from the fields of orders.transactions[0].receipts.gift_card_id and orders.transactions[0].receipts.gift_card_last_characters

 

In the GraphQL Admin API, you can get this data through the fields of order.transactions.receiptJson

 

 

 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
BLC-Nicolas
New Member
8 0 0

Hi Hassain,

 

Thanks for your answer. I am using the REST Admin API but I can't find the transaction you are talking about in my JSON file.

0 Likes