Skip to main content

inventoryAnalyticsV2

Requires an authenticated session.

Inventory analytics for a date range: valuation, stock-outs, dead stock, oversold items, shrinkage, expiring batches, the mix of movements and the turnover ratio. The range is required and limited to 400 days.

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 InventoryAnalyticsV2($range: InventoryRangeInput!) {
inventoryAnalyticsV2(range: $range) {
oversold
stockouts
turnoverRatio
deadStock {
productName
lastMovementAt
productId
quantity
value
variantSku
}
}
}

Variables:

{
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}

Response:

{
"data": {
"inventoryAnalyticsV2": {
"oversold": 0,
"stockouts": 0,
"turnoverRatio": 0,
"deadStock": [
{
"productName": "string",
"lastMovementAt": "2025-01-15T00:00:00Z",
"productId": "id",
"quantity": 0,
"value": 0,
"variantSku": "string"
}
]
}
}
}
inventoryAnalyticsV2(
range: InventoryRangeInput!
): InventoryAnalyticsV2!

Arguments​

inventoryAnalyticsV2.range ● InventoryRangeInput! non-null input​

The date range and optional warehouse to report on.

Type​

InventoryAnalyticsV2 object​

Stock figures for the period.