Checkout API - Free shipping discount

DiscountNinja
Shopify Partner
104 0 66

When creating a checkout via the Checkout API one can apply a discount to the order using the AppliedDiscount.

This allows the consumer of the API to add a custom discount.

 

However, this discount cannot be a "free shipping" discount.

How can we set a discount for the shipping line?

 

Note: I am aware that the DiscountCode field can be used to add an existing "free shipping" discount code.

However, we want to avoid using the discount code field for this purposes. There are a number of use cases where we cannot use the discount code field, so we're looking for an alternative.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
Replies 2 (2)

Ryan
Shopify Staff
499 42 120

Hi Bart,

 

Unfortunately no, the only way to add a free shipping discount using the checkout API is by adding an existing free shipping discount code.  Can you expand on the scenario that you are trying to offer to customers that prevent using a code? Feel free to DM or email as well if you don't want to share publicly.

 

Cheers,

Ryan

 

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

DiscountNinja
Shopify Partner
104 0 66

Hi Ryan,

 

Thanks for the answer. I sent you a DM with the rationale.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016