Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Order GraphQL shipping line discountedPriceSet wrong

Order GraphQL shipping line discountedPriceSet wrong

ftballguy45
Shopify Partner
32 0 12

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
Community Manager
3108 344 891

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 12

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