This question is about storefront API specifically on checkout. I have my own dynamic shipping rate calculator API which I want to use on checkout. That means I do not have any shipping rates set on Shopify Admin. Is there any mutation I can use on the Checkout API that does this? I am aware of the checkoutShippingLineUpdate mutation but that relies on a shippingRateHandle that needs to exist in the Shopify Admin. Appreciate any help on this. Thanks!
Thanks for your post. There is not any direct mutation to get custom rates into the checkout.AvailableShippingRates in the Storefront API. The way to connect a dynamic shipping rate calculator would be to set it up as a CarrierService server that provides rates when queried, and which currently can only be set up via REST API:
This would also require that the store has the carrier calculated shipping option enabled which is only available on some plans. Once the carrier service is set up and working the rates from it come through when querying checkout.AvailableShippingRates in the Storefront API.