Shipping discount shopify functions API

Shipping discount shopify functions API

VladSofronov
Shopify Partner
6 1 3

I'm trying to build a discount app which gives free shipping on a certain shipping method when items with a certain tag are in the cart.

 

Currently, I received a cart.deliveryGroups.deliveryOptions.handle handle from on function input, and I applied a discount using discout.targets.deliveryOption.handle and it works great because I basically hardcoded handle variable in my code.

 

Questions is how can I query what deliveryOptions handles are available via admin API when I built UI for my app?

 

I want obviously user to be able to select which delivery option he wants to discount, and in order to do it I need to know which ones are available and what their handles are.

 

Thanks!

Reply 1 (1)

DaniilM
Shopify Partner
1 0 0

Hi there,

 

Have you fixed it? Have you fixed your JS? How did you implement it with GraphQL ( I don't see any shipping function for mutation). Could you share the code please? 

 

Kind regards,

Dani M