ShopifySharp
ShopifySharp copied to clipboard
Wrong LocationId in Order
Hello Guys,
I need to get the location of my articles in a order.
I get the location id with the field LocationId in Order.cs class. But I get wrong (id of the default location) or null id.
I suppose it's a bug Someone can help me ?
TY
Hey @chtoine, did you get this fixed? I'm not sure what the cause would be, but have you looked at the OriginLocation
on each of the order's line items?
Hey
Sorry i was on vacation.
I tried this morning with OriginLocation in LineItem but he return the wrong id (default location id again :/)
When i see my order in the web interface, I see location "AMZ" but with OriginLocation in LineItem.cs or LocationId in Order.cs I get location id off "ENTREPOT" (my default location).
I don't know why.
I have an other question.
With InventoryLevel class I can get the available stock but i can't get the asigned stock.
For example:
I get available stock (5) but how i can get asigned stock (1).
Do you have an idea ?
TY for your help
Unfortunately the inventory API is something I've never worked with very much, so I'm a little unclear on how it all ties together at the moment. I'll see if I can play around with it soon and get a better grasp on how it works.
@chtoine You need to read FulfillmentOrders to get this info.
Quite similar to Fullfillments, but each order line will have the assigned location id. It can even be so flexible that one order line might be fulfilled from different locations. Let's say that the order line has 3 x Product A. 2 x Product A might be assigned to location A, and 1 to location B.
The location id on the order is misleading.
The whole location thing is very complex.