Batch update Variant "inStock" through API

I cannot update the inStock value of Variants through REST API for some reason. I make a PUT request to the endpoint „/api/variants/“ passing the array of objects with id. HTTP 200 OK response is being returned but the values are not changed. What am I doing wrong?

Without knowing your PUT payload, i assume you have to add the parameter

useNumberAsId=true

to your queried endpoint. The same applies to the REST Product resource (which, in this case, you could use instead)