Get shippingRate handle via rest api

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?

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?

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

1 Like