Skip to main content

inventorySummary

Requires permission inventory:stock_level:read.

Returns headline stock figures: total products and variants, total and available quantity, and the number of low-stock, out-of-stock and overstock items. Pass warehouseId or productId to narrow it. Needs the stock level read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query InventorySummary {
inventorySummary {
lowStockItems
outOfStockItems
overstockItems
totalAvailable
totalProducts
totalQuantity
recentMovements {
type
count
quantity
value
}
}
}

Response:

{
"data": {
"inventorySummary": {
"lowStockItems": 0,
"outOfStockItems": 0,
"overstockItems": 0,
"totalAvailable": 0,
"totalProducts": 0,
"totalQuantity": 0,
"recentMovements": [
{
"type": "ADJUSTMENT",
"count": 0,
"quantity": 0,
"value": 0
}
]
}
}
}
inventorySummary(
productId: ID
warehouseId: ID
): InventorySummary!

Arguments​

inventorySummary.productId ● ID scalar​

Only this product.

inventorySummary.warehouseId ● ID scalar​

Only this warehouse.

Type​

InventorySummary object​

Headline stock figures for the inventory dashboard.