Ryan, I read it, but I can't understand how to do it. Should I manually create location level record for each variant?
Also this link is not correct maybe (https://help.shopify.com/api/reference/location)?
I'm not sure I understand your question Andrii, and this forum isn't the best platform for 1:1 support. Could you email firstname.lastname@example.org and add some more details to your request. Thanks!
So the new flow of product creation would be:
- Setup JSON for a full product including properties, images, variants, metafields, etc...
- POST to /admin/products.json
- Inspect response JSON to get inventory item ID's
- For each variant's inventory_item_id, submit a POST to inventory_levels/set.json to set its available inventory
This right? Make sense? No way to create a product with inventory levels in one call anymore?
This is correct.
Hi all, this change is tough on developers. I would actually suggest talking this out here would be great!
The email is handled by a whole team, and can help with specific shops, request-ids, and other private data. General questions are fine here though.
Thanks a lot Ryan. That definitely helps. In case of a store with multiple POS locations and the has_multi_location flag set to false, how will Shopify behave? Would inventory and orders be handled same as if the multi-location flag was set?
Again thanks for all the clarifications.
When the merchant opts in to multiple locations (aka enabling the flag), this allows the merchant to create new locations, and automatically connects all of their existing inventory to the shipping origin location. All other behavior is already implemented and functioning currently.
1. This change violates the golden API rule.. once publised, behaviour should not change or break. Why not allow us to continue setting variant -> inventory_quantity and under the hood just update the appropriate inventory item/level for the default Location?
2. This change will incur extra API calls.
1. This is why we gave as long of a lead time as possible, we recognize that this is a large change for developers and will continue to work with you to get it done.
2. If your apps are having issues being rate limited due to the new multi-location features, please reach out to email@example.com and we can discuss your individual use-cases.
Upon further review... (a) and (b) seem to contradict each other or does "Setting inventory_quantity.." refer to current behaviour?
The wording has since been updated to clarify: "The following behaviors are temporary and exist only to help you migrate to the Inventory API. Updating inventory using the Product and ProductVariant APIs is deprecated, and should no longer be relied upon to update inventory."
So with a new shop where you have to add lets say 100 product calls to the api, you now have to add that x times for each variant due to the inventory level getting its own endpoint ? Isn't it possible to just send the inventory items with the variants within the same call for when you add a new product with variants ?
In order to set the inventory level on a new inventory item, yes you will need to make another call. You cannot set the inventory level in the same call as creating the variant.
Thanks a lot for all the help and insights you gave us so far. While performing our final acceptance tests, we found out that the `location_id` attribute of the order object is always set to `null` and instead, it is the fulfillement object which now holds the location from where the order is fulfilled.
Will the `location_id` attribute of the order object be deprecated?
Thanks in advance,