inventory_quantity deprecated?

Amber_Walker
Tourist
5 0 3

Creating a product and specifying inventory at the same time used to be as simple as specifying "inventory_quantity" (see https://community.shopify.com/c/Shopify-APIs-SDKs/Create-Product-With-Inventory-Levels/m-p/559533)

 

This is now disallowed with the following error:

 

Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API

A few things:

 

Is there ANY way to do the same thing without making multiple API calls? We sell unique items. Theres exactly one of everything, meaning we are already under quite a large amount of strain with the number of API calls we have to make already.

 

Can someone from Shopfiy please explain why this breaking change was made without a version bump? What's the point of versioning your API if you're going to just insert breaking changes anyway?

0 Likes
spadae22
Excursionist
12 0 3

https://github.com/Shopify/shopify_api/issues/632

WELL KNOWN, they flpped the switch on March 16th, now 2019-10, 2020-01, have the same bug.

ER


@Amber_Walker wrote:

Creating a product and specifying inventory at the same time used to be as simple as specifying "inventory_quantity" (see https://community.shopify.com/c/Shopify-APIs-SDKs/Create-Product-With-Inventory-Levels/m-p/559533)

 

This is now disallowed with the following error:

 

Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API

A few things:

 

Is there ANY way to do the same thing without making multiple API calls? We sell unique items. Theres exactly one of everything, meaning we are already under quite a large amount of strain with the number of API calls we have to make already.

 

Can someone from Shopfiy please explain why this breaking change was made without a version bump? What's the point of versioning your API if you're going to just insert breaking changes anyway?


 

0 Likes
ktbunch
New Member
1 0 0

We are seeing the same issue, but do not use the inventory_quantity or adjustment fields.

 

We can't create or update products since this regression.

0 Likes
spadae22
Excursionist
12 0 3
Correct, Here is the issue. I reverted to 2019-07, all good. shopify made an update Monday March 16th and broke it….

The reason why the "inventory_quantity" field is still present when you read a Product Variant from our API but the API won't allow you to include this field in the update request is because this field is "read only". Since the Product object does not use this field, there is no issue with reading a Product directly from the API and then immediately updating it.

But I do agree that this is indeed an issue with the 2019-10 API Version - there should be an easier way to update a Product Variant than to use the workaround of reading the Product Variant, setting it to a local object, deleting the attributes of "inventory_quantity" and "old_inventory_quantity" on the local object, and then running the save() function. Fortunately there is a GitHub issue opened for this problem (https://github.com/Shopify/shopify_api/issues/632 ), so hopefully it should be solved soon
0 Likes
Amber_Walker
Tourist
5 0 3

This isn't so much about using a client library--we're making direct calls to the RESTful endpoint--but rather:

 

1) Why? We're going to have to (at minimum) double the number of API calls with this change. That's an enormous burden on stores that sell unique items and are already struggling with the existing throttling requirements.

 

and

 

2) Why would you make a breaking change right after you force everyone to use a versioned API?

 

Shopify's determination to remain completely silent on this matter is disrespectful. We deserve an answer.

spadae22
Excursionist
12 0 3

They moved the update to July 1st, so just use 2019-07.

 

Hello there,

With the evolving concerns around COVID-19’s impact on communities around the world, we know that partners and merchants are making adjustments to continue running their businesses smoothly. That’s why we’ve decided to postpone the April 1 version removal to July 1, 2020.

What does this change mean?
This means that you have additional time until July 1 to update your private apps to account for changes in both 2019-07 and 2019-10 API versions. Specifically, the move from page to cursor based pagination will come into effect for all endpoints on July 1, which should simplify the migration process for your apps.

In the coming weeks, we’ll follow up with emails outlining the detailed changes each of your private apps needs to make.

For those of you who’ve put in the time and energy to update already, we want to say thank you for your diligence and understanding in the extension—your efforts haven’t gone to waste.

If you have any questions, chat with us in the API forums or the Support section of the Partner Dashboard.

Thank you,
Shopify Apps Team

0 Likes
Amber_Walker
Tourist
5 0 3

...

 

I have a dream 

 

...

 

That you will read the two questions I asked ... and answer both.

 

...

 

As it stands right now, Shopify's support has failed the turing test.

0 Likes
moshelog
Excursionist
17 0 3

Hey guys, So this is a known issue?

 

We're having issue with inventoryquantity end point and according to Shopify on July 1 we need to update to 2019-10 api version 0r later https://prnt.sc/sf2d8l

 

this is example of request we're getting deprecated call
we sending request to this endpoint
https://moshe109.myshopify.com/admin/api/2020-04/graphql.json

 

mutation {
productUpdate(input: {id: "gid://shopify/Product/4454791512122",
variants: [

{ id: "gid://shopify/ProductVariant/31546049593402", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049626170", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049658938", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049691706", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049724474", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049757242", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049790010", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049822778", inventoryManagement: NOT_MANAGED}

]
} ) {
product {
id
}
}
}

 

 

So, what's next? what we should do about this issue. 

 

Thank you

Moshe Lugasi
0 Likes
spadae22
Excursionist
12 0 3

They delayed the update again, so you can just call 2019-07 for now. It is delayed to an unknown date, but you can still update inventory using the new method,just call 2019-07, 2019-10 or above will crash.

ER


@moshelog wrote:

Hey guys, So this is a known issue?

 

We're having issue with inventoryquantity end point and according to Shopify on July 1 we need to update to 2019-10 api version 0r later https://prnt.sc/sf2d8l

 

this is example of request we're getting deprecated call
we sending request to this endpoint
https://moshe109.myshopify.com/admin/api/2020-04/graphql.json

 

mutation {
productUpdate(input: {id: "gid://shopify/Product/4454791512122",
variants: [

{ id: "gid://shopify/ProductVariant/31546049593402", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049626170", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049658938", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049691706", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049724474", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049757242", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049790010", inventoryManagement: NOT_MANAGED}

{ id: "gid://shopify/ProductVariant/31546049822778", inventoryManagement: NOT_MANAGED}

]
} ) {
product {
id
}
}
}

 

 

So, what's next? what we should do about this issue. 

 

Thank you


 

0 Likes
moshelog
Excursionist
17 0 3

@spadae22 wrote:

They delayed the update again, so you can just call 2019-07 for now. It is delayed to an unknown date, but you can still update inventory using the new method,just call 2019-07, 2019-10 or above will crash.

Big thanks for the quick reply, do you have an official announcement source for this delay? i haven't see anything about it

Plus in our dashboard it is still mentioned to update to 2019-10 or later by july 1.

 

Again, thanks for the update here. 

Moshe Lugasi
0 Likes