shopifyshopify-api

How to get a product / variant "committed" inventory?


Problem:

On the Shopify Admin, section Products > Inventory, there's a "committed" inventory. Shopify inventory Based on my comprehension it means "reserved stock for pending orders", or "inventory reserved by orders created but not yet completed".

This "committed" stock value can be very useful for stock updates by app. But pratically this value seems hard to retreive.

Question:

How to get this "committed" inventory value in an efficient way ?

Current state of researchs :


Solution

  • It's possible now in the 2023-01 version of the API. The InventoryLevel got a new field quantities, which returns this for a product with a total stock of 10 and two sold:

    [
      {
        "quantity": 8,
        "name": "available"
      },
      {
        "quantity": 2,
        "name": "committed"
      },
      {
        "quantity": 0,
        "name": "incoming"
      },
      {
        "quantity": 10,
        "name": "on_hand"
      },
      {
        "quantity": 0,
        "name": "reserved"
      }
    ]