Discussing Shopify Functions development, deployment, and usage in Shopify apps.
Hi everyone
Is there a way to get the shippingRate handle through the rest API?
I call https://shopify.dev/docs/api/admin-rest/2024-01/resources/shippingzone
and get all shippingRates with ids
But in the shipping-discount function I need to send deliveryOption.handle
https://shopify.dev/docs/api/functions/reference/shipping-discounts/graphql#functionrunresult
can I convert from shippingRate.id to deliveryOption.handle?
Solved! Go to the solution
This is an accepted solution.
Hi Shoshana,
I think I see the issue you're experiencing - in GraphQL the ShippingRate object has a handle field, but this is not accessible in REST - is this the issue that's blocking you from completing this tutorial?
Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Can you elaborate? I'm also trying to access deliveryOptions.handle via graphql admin and don't understand how to do it.
I'm trying to build shipping discount app using shopify functions and I'm trying to figure out how to make deliveryOption to discount user controllable, and in order to do it I need to get it handle from my app(not from function) to pass it to app via metafields I guess
This is an accepted solution.
Hi Shoshana,
I think I see the issue you're experiencing - in GraphQL the ShippingRate object has a handle field, but this is not accessible in REST - is this the issue that's blocking you from completing this tutorial?
Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Can you elaborate? I'm also trying to access deliveryOptions.handle via graphql admin and don't understand how to do it.
I'm trying to build shipping discount app using shopify functions and I'm trying to figure out how to make deliveryOption to discount user controllable, and in order to do it I need to get it handle from my app(not from function) to pass it to app via metafields I guess