The new fulfillment change about the new location_id parameter is not clear
The documentation says
"After August 1st 2018, apps will be required to specify a
location_id when creating fulfillments"
But it's not written anywhere that it needs to have the same value as the order entity
We were getting "Unprocessable entity" without any additional message when trying to fulfill an order with the shop' main location_id
Then we looked at the order entity location_id and it was null, so we removed the location_id parameter from the fulfillment call and it worked fine
Could you please check?
The location_id attached to an order object doesn't actually have anything to do with the new inventory/fulfillment API functionality to support multiple locations, so it shouldn't be used in that way.
That field has been there since our Point of Sale app was built years ago so it could be able to specify which storefront an order was placed from. Now that the rest of Shopify is becoming aware of multiple locations as well though it's understandably a bit confusing to see that there.
We have some documentation here that outlines how you would get the location_id that you'll need, I'd suggest giving it a read because there will be a point where a fulfillment won't work at all when it doesn't contain a correct location_id.
Ok, maybe it works good with graphql but with rest api I need to do request over request until I can fulfill the order? If yes, it is the badest approach you provide. It will slow down the performance of every app or web application. Additionally, it is not a clean way ;-) The better way would be if you could just provide the location id in the order json file and the user would just send the request once. That's it.