I’m a developer and I’m trying to update stock quantity for a variant. It does not update the stock quantity and the request returns status code 200 with the old variant data (without updating it).
I’m sending a PUT request to url: https://{shopify_key}:{shopify_secret}@{shopify_url}/admin/api/2021-01/products/{product_id}.json
Request body:
{
“product”: {
“id”: “{product_id}”,
“variants”: [
{
“id”: “{variant_id}”,
“inventory_quantity”: 10
}
]
}
}