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

Created by Aiden Hua, Modified on Thu, 04 Jan 2024 at 09:50 PM by Aiden Hua

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 you have any questions or need further support, please don't hesitate to contact us.



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 atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article