How can I update the 'In stock' product attribute using API?

Please give an example or a link to documentation on how to update the “In stock” product attribute.

One way to approach this is by setting the inventory levels using the API call:

https://shopify.dev/docs/api/admin-rest/2023-10/resources/inventorylevel

Does not work. For example, I want to receive remaining goods.

I do admin/api/2023-07/products/7201269383337.json and get

“inventory_item_id”: 44019896254633

Then I do /admin/api/2023-10/inventory_levels.json?inventory_item_ids=44019896254633&location_ids=65058963625 and get follow

{
“inventory_levels”: [
{
“inventory_item_id”: 44019896254633,
“location_id”: 65058963625,
“available”: null,
“updated_at”: “2022-07-28T19:24:01+03:00”,
“admin_graphql_api_id”: “gid://shopify/InventoryLevel/99386556585?inventory_item_id=44019896254633”
}
]
}

“available”: null

but the website shows “in stock”

Hmm and you’re sure that you have inventory tracking enabled on that one? Also do you have Continue Selling When Out Of Stock enabled?

I will find out this from the site admin.

Can this be done through a third party plugin?

You can find that in the shopify admin:

I think the reason available is null is because you don’t have Track quantity ticked.