inventories
Requires at least one of the permissions inventory:stock_adjustment:create, inventory:stock_level:list, inventory:stock_level:read or inventory:stock_transfer:create.
Lists stock rows: each variant's stock and reorder settings per warehouse, with the row ID, SKU and warehouse, and quantities on hand, reserved and available. Search by SKU, product or warehouse name; filtered, sorted and paged. Use inventoriesCount for the total. Needs the stock level read or list permission, or the stock adjustment or stock transfer create 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:
- GraphQL
- cURL
query Inventories {
inventories {
totalCount
items {
id
batchNumber
serialNumber
createdAt
availableQuantity
averageCost
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Inventories {\n inventories {\n totalCount\n items {\n id\n batchNumber\n serialNumber\n createdAt\n availableQuantity\n averageCost\n }\n }\n}"
}
EOF
Response:
{
"data": {
"inventories": {
"totalCount": 0,
"items": [
{
"id": "id",
"batchNumber": "string",
"serialNumber": "string",
"createdAt": "2025-01-15T00:00:00Z",
"availableQuantity": 0,
"averageCost": 0
}
]
}
}
}
inventories(
filter: InventoryFilterInput
orderBy: InventoryOrderByInput
skip: Int = 0
take: Int = 50
): PaginatedInventories!
Arguments
inventories.filter ● InventoryFilterInput input
Optional filters: warehouse, product, variant, search text, batch, serial number, quantity range, stock status flags such as low, out of or over stock, and date ranges.
inventories.orderBy ● InventoryOrderByInput input
The field to sort by, such as quantity, available quantity, reserved quantity, last counted time, update time, total value, or product or variant name.
inventories.skip ● Int scalar
How many rows to skip. Defaults to 0.
inventories.take ● Int scalar
How many rows to return. Defaults to 50 and is capped at 100.
Type
PaginatedInventories object
A page of stock rows.