How can I modify variant API to remove 'Follow quantity'?

Hi guys,

I am developing an application to manage my stocks, both my internal stock and my dropshipping suppliers stocks.

I have a problem, I would like to modify my variants by API to remove “Follow quantity” when my supplier has the item in stock. I don’t use “Continue to sell” option because it is set on my theme as pre-order. So I use the following requests:

if available:
    variant = {
        "id": variant_id,
        "inventory_management": "null",
    }
else:
    variant = {
        "id": variant_id,
        "inventory_policy": "deny",
        "inventory_management": "shopify",
    }

However, when I use “inventory_management”: “null”, I get a 422 error with “You must also set the fulfillment_service to null” but it does not work even if I set the fulfillment_service to Null !

Do you have any idea ?

Thanks a lot !