REST API Product Variation Stock Update with no Parent Product ID

I am trying to use REST API to update simple products and product variations from a script to automate the process of syncing stock quantities with my inventory management system. The problem I am running into is that my variable products only have SKUs on the variations and not the parent and my program uses a CSV to match SKUs and update the stocks of them so it only ever gets the IDs of the variations and not the parent. This would be fine if I was able to use PUT to update the stock quantities of the variations but it says that it requires the parent product_id. Is there any way of working around this or would I need to consider switching all my products to simple products.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer