How to get data of Order used Gift Code via API?

Created by Aiden Hua, Modified on Tue, 21 Apr at 11:56 PM by Support Agent

QUESTION:

I want to know which Order/Invoice was in used or applied Gift Code right -> How to get data of Order used Gift Code via API?


ANSWER:

Regarding the Gift card data retrieved in Order/Invoice via API, I would like to share you as below:

+ The Bss_GiftCard module supports displaying gift carts with the gift_card_amount of the invoice API.

 

+ You could use this endpoint: https://imgur.com/z2loiqS - /rest/V1/invoices/ <method GET> with custom searchCriteria

 

In my example below, it will display pageSize 1000 -> display 1000 invoices

--> You could refer it here: https://developer.adobe.com/commerce/webapi/rest/quick-reference/

 

+ Orders or invoices that use gift cards will have gift_card_amount https://i.imgur.com/JYTGUGh.png

"extension_attributes": {

"gift_card_amount": 49.9425

 }




If there are any issue, please feel free to contact us. We're always pleased to support you. As a trusted Magento 2 extensions provider with 14+ years of experience, serving 75,000+ customers worldwide, we specialize in developing 150+ high-quality Magento 2 extensions that enhance functionality, improve user experience, and support scalable growth. Our reputation is built on long-term partnerships, positive feedback, and proven performance-driven solutions.


Explore our extensions here in: https://bsscommerce.com/magento-2-extensions.html

Discover our top tier plugins:


FYI, this issue would be resolved totally from v2.1.8


Regards, 




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article