A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
I have the next problem, I try to adjust inventory item but i got error
pyactiveresource.connection.ResourceNotFound: Not Found: https://my-shop-name.shopify.com/admin/inventory_levels/adjust.json
Here is my code:
shop_url = "https://%s:%s@my-shop-test.myshopify.com/admin/" % ('apiuser', 'apipass')
shopify.ShopifyResource.set_site(shop_url)
shop = shopify.Shop.current
inv = shopify.InventoryLevel()
shopify.InventoryLevel.adjust(location_id = locationid, inventory_item_id=iventoryid, available_adjustment=6)
Why I got this error?
Thanks
Solved! Go to the solution
This is an accepted solution.
EDIT SOLUTION:
I got wrong location id and item_inventory_id
If others want to help you need to get location id from
for location in shopify.Location.find():
print(location.id)
and product inventory_item_id for every variant
for product in shopify.Product.find():
print(product.variants[0].inventory_item_id)
I try and now i got this error
pyactiveresource.connection.ResourceNotFound: Not Found: https://site.myshopify.com/admin/api/2022-04/inventory_levels/adjust.json
In the url, you need to specify the api version, for instance 2022-04. Check example here.
This is an accepted solution.
EDIT SOLUTION:
I got wrong location id and item_inventory_id
If others want to help you need to get location id from
for location in shopify.Location.find():
print(location.id)
and product inventory_item_id for every variant
for product in shopify.Product.find():
print(product.variants[0].inventory_item_id)
I try and now i got this error
pyactiveresource.connection.ResourceNotFound: Not Found: https://site.myshopify.com/admin/api/2022-04/inventory_levels/adjust.json