Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

REST API, occasional 404s returned when setting inventory levels

REST API, occasional 404s returned when setting inventory levels

sexybit
Shopify Partner
19 0 0

As per subject, on occasion I'm logging 404/Not found responses when attempting to set inventory levels for certain variants. However, when retrying the exact same operation at a later date, it goes through as expected.

 

Since the exact same IDs (location, variant, etc) are being used, I presume this is a problem on Shopify's end.

 

Here's an example dated 26.04.2023, X-Request-ID: 8e459432-729e-4d06-a895-4380ce3391a2

Same exact inventory level update operation retried today, 05.07.2023, it went through.

 

I see here on the forums that this issue has been noticed and reported by others (using GraphQL). If someone from Shopify could kindly (and quickly) look into it as it's a pretty serious one as I'd rather not go through the trouble of writing code to "double check" every single operation / API call.

 

 

Replies 3 (3)

Liam
Community Manager
3108 344 889

Hi - thanks for flagging this unexpected behaviour. We're looking into this on our end and will update here asap.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

sexybit
Shopify Partner
19 0 0

Thanks, Liam.

 

I'm glad this is being acknowledged in the first place. Perhaps you could look into this as well (malformed JSONs being returned): https://github.com/Shopify/shopify-api-php/issues/231

 

Back to the topic at hand, based on my logs, this 404 is being returned in 0.65% of cases and, judging from a quick search I did here on the forums, it isn't limited to inventory level setting.

 

anaconx
Visitor
2 0 1

Hello @Liam @sexybit , I am also facing the same issue while trying to update inventory via RESTAPI. is there any update on this issue?