A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am seeing something strange using the invetory set api
InventoryLevelService
I use as variants of a product to find inventory item id
I provide the Location ID (this store only has one location for inventory)
I send a Post call to the
Inventory_levels/set.json
with the following content:
{"location_id": 80014508354,"inventory_item_id": 46917888409922,"available": 20}
Getting the 404 error as follows:
"HttpResponse = { StatusCode: 404, ReasonPhrase: 'Not found', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Date: Tuesday, April 11, 2023 14:00:24 GMT
Transfer encoding: in chunks
Connection: Keep-Alive
X-Sorting-Hat-PodId: 321
X-So..."
Request ID: cc2350a0-f86a-4b7f-9839-e89a28ba40b7
This code was running normally until 2023-03-06. It started showing this error from then on.
I checked the existence of the Inventory Item and the Inventory Level. The location id is also correct.
All items have been checked, there does not seem to be a Reason for the error to occur. The store is since Friday without updating balances.
Any help will be greatly appreciated.
Nilson
Hi, @NilsonCosta
It's possible that the issue you're experiencing with the Shopify API is related to changes or updates made to the platform, or potentially an issue with your API credentials or permissions.
Here are some steps you can take to troubleshoot the issue:
Check the Shopify API documentation to see if there have been any recent updates or changes to the InventoryLevelService API that may affect your code.
Double-check your API credentials and permissions to ensure that you have the necessary permissions to make changes to inventory levels.
Verify that the Inventory Item and Inventory Level that you are trying to update actually exist in your store. You can do this by querying the relevant endpoints in the Shopify API.
Check if there are any apps or custom code that may be interfering with your API calls. Try disabling any custom code or apps and see if the issue persists.
If you're still experiencing the issue, you can try contacting Shopify support for further assistance. They may be able to provide more insight into the issue and help you resolve it.
It's also worth noting that if your store hasn't updated balances since Friday, there may be an issue with inventory syncing or updates. You can try manually updating the inventory levels for the affected products to see if that resolves the issue.
Hello Nilson,
I was wondering if you got to the bottom of this as I'm experiencing something similar, albeit on an occasional basis. Very troublesome behaviour.
I've reported it here: https://community.shopify.com/c/products-variants-and/rest-api-occasional-404s-returned-when-setting...