Order GraphQL shipping line discountedPriceSet wrong

ftballguy45
Shopify Partner
32 0 11

Order shippingLines discountedPriceSet is wrong. Per the documentation this field "discountedPriceSet" should be "The pre-tax shipping price with discounts applied."

We have an order with a free shipping discount code applied. The amount of the shipping is $5, and the discount code is for free shipping. The "discountedPriceSet" says $5 - shouldn't it be $0?

 

"node": {
                            "title""Economy (Free Shipping on orders over $100)",
                            "originalPriceSet": {
                                "presentmentMoney": {
                                    "amount""5.0"
                                }
                            },
                            "discountAllocations": [
                                {
                                    "discountApplication": {
                                        "allocationMethod""EACH",
                                        "targetType""SHIPPING_LINE",
                                        "value": {}
                                    },
                                    "allocatedAmountSet": {
                                        "presentmentMoney": {
                                            "amount""5.0"
                                        }
                                    }
                                }
                            ],
                            "discountedPriceSet": {
                                "presentmentMoney": {
                                    "amount""5.0"
                                }
                            }
                        }
Replies 2 (2)

Liam
Shopify Staff
2731 302 783

Hi Ftballguy45,

 

Which API version are you using to make this query? Also, could you double-check how the discount is being applied in your Shopify admin? Sometimes, the way discounts are set up can affect how they are applied and reflected in the API responses.

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

ftballguy45
Shopify Partner
32 0 11

Hello - the discount is set up as a shipping discount.