-
-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product Services:UpdateAsync - (400 Bad Request) Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. #484
Comments
I see that same issue has been raised on the Shopify api ruby gem repo. This means it's a bug in Shopify side and not a problem with ShopifySharp. |
Please see my comment here. |
Thank you @clement911 and @EmmaB could you please help me to understand how to handle within shopifysharp? found below threads in shopify, |
@madushann Try this code out.
|
@mark-jeanswhse Thank you very much. I am going to try, just wondering will this update the product with missing data ? |
@madushann It's possible that it could mess up some product data, since many of the properties you don't set would be serialized as You should also be able to just set the var product = await productService.GetAsync(productId);
product.Tags = newTags;
product.InventoryQuantity = null;
product = await productService.UpdateAsync(productId, product); I'm going to publish an update to the |
Actually "InventoryQuantity" is in the ProductVariant, which need to be set iterating the variant list.
|
Hope, Once you push the update will be available straight forward with newer version. |
Loading the product using GetAsync,
Product product = await productService.GetAsync((long)apiCall.Product.Id);
product.Tags = newTags;
product = await productService.UpdateAsync((long)product.Id, product);
calling the UpdateAsync gives below error,
(400 Bad Request) Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API.
Stack trace:
at ShopifySharp.ShopifyService.CheckResponseExceptions(HttpResponseMessage response, String rawResponse) at ShopifySharp.ShopifyService.<>c__DisplayClass26_0
1.<b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at ShopifySharp.DefaultRequestExecutionPolicy.Run[T](CloneableRequestMessage request, ExecuteRequestAsync
1 executeRequestAsync) at ShopifySharp.ShopifyService.ExecuteRequestAsync[T](RequestUri uri, HttpMethod method, HttpContent content, String rootElement) at ShopifySharp.ProductService.UpdateAsync(Int64 productId, Product product)
The text was updated successfully, but these errors were encountered: