At the order list page of shop admin `/admin/orders` you can search by location at the upper right corner.
The filtering is using the location that it's selected in an order page at the top right part of the order line card.
When I get this order from the API I cannot find the Location_id of 'Chrisostomou smirnis 4' but insteed of that I find an origin_location that has an ID other than the location_id i am expecting.
If this wasn't enought trouble sometimes I cannot find origin_location at all!
My question is how to get the location_id that is assigned to a specific order_line?
You might find this recent thread of interest. As is mentioned toward the end, there is currently no way of querying Inventory Commitments.
That means, you cannot query via API the inventory location where a specific orders' items have been committed (I'd interpret that as N amount of items have been blocked from that locations' inventory).
That's not to say you cannot change the fulfillment location upon fulfillment, or that you cannot query loctations, inventory items, inventor levels etc. That you can do via API.
As for the location_id on the order object, it is not the location of inventory, but the location where the order was processed. For instance, storefront orders will have a null location while if you're placing an order via a draft order from admin you should get that default location associated with the user / admin as that's who and from where is processing the order.
Hope this helps!
I am facing the same issue also, where should I get the location_id in API like how the Shopify Admin portal filtered the order by location.
I try to query the FulfilledOrder API to get the assigned location id, but it always returns empty data.