How can I apply discount on line_items when im create a new order using REST Admin Order API?
I've tried to set almost every possible keys available in the line_items. And my requirement must be an Order, not DraftOrder.
I've even tried to create first, then later update the line_items with discount but still no avail.
I'm open for GraphQL API solution as I'm using this package in my application >> https://github.com/MONEI/Shopify-api-node
Hope someone has done similar thing. Thanks
Hey there @ikkifujiwara
I've looked into this and presently this is not possible using the Orders API. In Storefront API, (checkoutDiscountCodeApplyV2 mutation would apply an existing discount to a checkout) - that's seemingly the closest we've got to what you're looking for.
It's mentioned that Discounts can't be applied to specific items within an Order in the Orders CSV docs strangely enough, I'll look at getting this same mention into the API docs.
I've noted that there are other partners who are looking for the same functionality and I've made this known to the product team today. If there's any future updates, they'll be communicated via the Shopify Community forums and via our Developer Changelog. Hope that explains things at least!
thanks so much for your reply. i'm trying out your method and finger-crossed i can make it.
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022