Discount Applications exposes line level discounts on the Order API

Ryan
Shopify Staff
492 42 113

Hi!

If you missed it at Unite this year, we've exposed line level discount information on the Order API with a new readable property: discount_applications.  Take a look at the updated Order API reference for all of the details.  This feature will enable more accurate accounting when discounts are involved in orders.

We look forward to seeing what features this enables, as always please leave questions and comments in the thread below.

Shopify Apps Team

Ryan | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Replies 42 (42)
sebryu
New Member
3 0 0

Hi all! Is there any way to check if the discount in order is from automatic discount or other source?

Klarna
Shopify Partner
4 0 0

Thanks Shopify for the fix on Dec 11, 2018 so that now the Checkout object has the correct automatic discount data prior to the customer placing the order!

sebryu
New Member
3 0 0

Hi all! Is there any way to check if the discount in order is from automatic discount or other source?

After more research I found answer for that. In order object there is field "discount_applications" and there is array with discount data. Automatic discount is listed there with "type: 'automatic'".