ShopifySharp icon indicating copy to clipboard operation
ShopifySharp copied to clipboard

How to get location id for a separate warehouse in get order - service.ListAsync()

Open DeveloperNaveenkumar opened this issue 3 years ago • 2 comments

Hi Team, Your product is good and useful to .net developers to consume Shopify data. I have one concern, I have two different warehouses one is in USA and another one in India, and in particular SKU has 2 stocks one in USA and another in India. When a customer ordered two quantity for the same SKU, Shopify allocated both stock to the order, In this case, I need location id for the two quantities. Based on this our .net service will do some changes to our database. Kindly help me with this. Reference code: var service = new OrderService(".myshopify.com", ""); var orders = await service.ListAsync();

DeveloperNaveenkumar avatar Feb 24 '22 07:02 DeveloperNaveenkumar

Hey @DeveloperNaveenkumar, did you get this working? I'm not super familiar with inventory/location stuff for Shopify as most of my apps/projects don't touch it, but I think you want to look at the Fulfillments array on the order. Each fulfillment will have a LocationId property.

nozzlegear avatar Mar 09 '22 04:03 nozzlegear

You need to use the FulfillmentOrder, and not Fulfillments. FulfillmentOrders returns allocation.

davidkdb avatar Sep 27 '22 06:09 davidkdb