Shopify 更新库存 400 错误请求

Shopify Updating Inventory 400 Bad Request

我想用 XML 更新 Shopify 中的一个简单商品。这是我发送给 Shopify 的内容:

<product>
  <id type="integer">6620419777</id>
  <title>Test</title>
  <inventory-management>shopify</inventory-management>
  <inventory-quantity type="integer">4</inventory-quantity>
</product>

我回来了"The remote server returned an error: (400) Bad Request."有什么想法吗?

库存数量属于产品变体。即使没有变体的产品实际上也有一个变体,只是在管理员中看不到而已。

相关文档:https://help.shopify.com/api/reference/product_variant