I encountered an issue while using the Shopify Admin GraphQL API. Here’s my setup:
- I fetch all ProductVariants’ inventory levels every 10 minutes
- Compare them with another data source
- Adjust if there are any differences
Today, I noticed a strange behavior with one product:
- The inventory should be 5, but the API returned 206 (I have the original JSON response saved)
- My system automatically adjusted it (reduced by 201)
- 10 minutes later, the API returned -196
- The system automatically adjusted again (added 201), bringing it back to 5
The main concern is: Why did the API return 206 as the inventory level? This caused incorrect adjustments and made the product unsellable.
I have attached the inventory adjustment history and the original GraphQL response data for reference.
Has anyone encountered similar issues or can explain what might have caused this behavior?