A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Orders created via the ShopifyAPI always seem to remove inventory from the default location.
Simply put - I want to specify the location that the inventory is removed from.
The location is represented by this label shown below.
On the ShopifyAPI::Order object, i have tried specifying:
- location_id: <second_location_id>
- line_items [{ origin_location: { id: <second_location_id> } }]
But, as said before, the highlight location in the screenshot above does not represent the location i specified, and the inventory is not removed from the location i specified
I am hoping for a direct answer of how I can create an order in shopify, and in that request, specify:
- the location to remove inventory from
- the location it will be fulfilled from (this is the same location as where it is removed from)
Thank you,
I am extremely eager to find this solution, I have already spent the whole day trying to figure it out.
Shaun
Hello @Cechner ,
For your specific operation, I would recommend looking at FulfillmentOrder. This object on an order contains the data related to inventory configuration, such as which location a given order will draw inventory from and what items are grouped together as part of the fulfillment.
Certain aspects of an order need to be configured via adjacent objects - for instance, many things related to an Order's payment status can only be configured by making entries to the transactions.json endpoint of the order, and similarly here, some of the inventory aspects must be accounted for via fulfillments endpoints.
I hope this helps!
Best,
To learn more visit the Shopify Help Center or the Community Blog.
Hi @GrahamS,
Thanks for the response!
I have read through the FulfillmentOrder documentation, and the orders we create do not themselves create FulfillmentOrders - so the resource just doesnt exist for me to work with
Do you have any suggestions why I might not have FulfillmentOrders?