Create order in Shopify through API and assign it to a specific location
We're using GraphQL queries from our mobile app to create orders in Shopify. As we will soon expand to have multiple stores (=Locations in Shopify), it's critical for us that we can connect orders we create through the API to a specific Location (the store closest to the customer), but I haven't figured out a way to do it.
I've found a way to first create an order (we use the draftOrderCreate mutation followed by draftOrderComplete mutation), and after the order is created (and automatically assigned to a Location chosen by Shopify logic), we can use the fulfillmentOrderMove mutation to move the order to a specific Location. The problem with this is that as soon as the order is created (initially with the wrong location then), it automatically syncs to other systems we use, e.g. for picking the order, and the location becomes wrong there as well, so the problem spreads to multiple systems.
So I'm trying to find a way where we can specify the location id at the time we create the order. Does anybody know how to do that? It doesn't have to be GraphQL, Shopify's REST API is fine to use as well.
Thank you so much in advance for tips - this is a business critical question for us and really, really hope that there is a solution out there