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.

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
3 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