I'm currently working on a project that uses the Shopify Storefront API. Our cart is rendered in a separate application and we use the Storefornt API to communicate with Shopify.
What we now want to achieve is that shipping costs are displayed in the cart. As far as I understand Shopify needs a valid shipping address to give information about the corresponding shipping methods and costs.
So our use case is: A customer creates a new checkout session, he is not logged in. He adds products to the cart and now we want to show him the shipping costs he might expect. Because he is a guest and not logged in we don't have any shipping address from the customer. So the API won't give me the shipping methods.
My approach was to add a country and city as default values for the shipping address while creating the checkout. But then the API answers that various fields are missing/are blank, like address1, zip and lastname.
So am I understanding it right that it's only possible to add a shipping address via the API if all fields are set?