draftOrderCreate API with Discount Code

Hello,

I have already created an App that creates a draftOrder via graphql and it’s working fine except now that we wanted the ability to have the customers add Discount Coupon, i read the docs and it seems not possible in draftOrderAPI but i saw an App that do the same as what i wanted except, we want the customer to add the discount code in cart frontend page, (on app that I mention, it’s manually added in draft order admin page).

I am just wondering what endpoint does the dev use. Here’s the app that i saw btw: Draftable ‑ Draft Order Helper - Tailor draft orders to customers with advanced customizations | Shopify App Store

If you check it, you will see that you need to click “create checkout link” in order for that draft order to have discount code.

Hello.

Were you able to find a way to apply the code through the graphql api?

Hi @natalia10

Still no luck for this one.

Any Shopify Staff that can help please?