Updated Deadline: Aug 1st -- [Deprecation] Important changes to ProductVariant, Refund and Fulfillment APIs

New Member
2 0 0

Hi Ryan,

Can you help me, I have a method that set inventory_quantity. The question is: what should I do now? Do you have some tutorial what to do in this case? For now I haven't any locations for my application.

Thanks, Andrii.

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Andrii, check out the inventory migration guide in the original post.  You will need to convert to the new inventory APIs.

Developer Experience @ Shopify
0 Likes
New Member
2 0 0

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)?

0 Likes
Shopify Staff
Shopify Staff
469 36 92

I'm not sure I understand your question Andrii, and this forum isn't the best platform for 1:1 support.  Could you email deprecations@shopify.com and add some more details to your request.  Thanks!

Developer Experience @ Shopify
0 Likes
Shopify Expert
60 0 24

Hi all, this change is tough on developers. I would actually suggest talking this out here would be great! 

0 Likes
Shopify Staff
Shopify Staff
469 36 92

So the new flow of product creation would be:

  1. Setup JSON for a full product including properties, images, variants, metafields, etc...
  2. POST to /admin/products.json
  3. Inspect response JSON to get inventory item ID's
  4. 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.

Developer Experience @ Shopify
1 Like
Shopify Staff
Shopify Staff
469 36 92

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.

Developer Experience @ Shopify
0 Likes
Shopify Staff
Shopify Staff
469 36 92

Paul,

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 deprecations@shopify.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."

 

Poul,

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.

Developer Experience @ Shopify
0 Likes
Tourist
12 0 1

Hi Ryan,

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,

Kind regards,

Tahar

0 Likes
Shopify Partner
14 0 3

Thank you Ryan,

I just noticed that SKU will also need special handling, incurring even more calls. The Product Variant API guide doesn't have SKU marked as deprecated fwiw.

Paul

0 Likes