Inventory valuation report

distru-report-inventory-valuationRead

Current stock and value per product, by state: active, reserved, available and incoming.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
calculationMethodenum
COSTPRICE
NoValues active stock at unit price (PRICE, default) or unit cost (COST, 0 when none). Only activeValue changes.
locationIdsstring[]NoNarrows the counted stock, not the products. ORed with userIds. Resolve via distru-search-locations.
searchstringNoCase-insensitive substring of product name or SKU, or fuzzy match on name. Row order unchanged.
userIdsstring[]NoNarrows the counted stock to these users' inventory, not the products. ORed with locationIds. Resolve via distru-search-users.
productCategoryIdsstring[]NoProduct category of the rows. ORed with productSubcategoryIds; a listed subcategory of a listed category narrows that category to it. Resolve via distru-search-lookups (type PRODUCT_CATEGORY).
productSubcategoryIdsstring[]NoProduct subcategory of the rows. See productCategoryIds. Resolve via distru-search-lookups (type PRODUCT_CATEGORY, each row's subcategories).
productTagIdsstring[]NoAny of these tags on the product. Resolve via distru-search-lookups (type PRODUCT_TAG).
vendorIdsstring[]NoThe vendor set on the product, not the company an order was placed with. Resolve via distru-search-companies.
brandIdsstring[]NoProduct brand of the rows, itself a company. Resolve via distru-search-companies, or read it on a distru-search-products row.
productGroupIdsstring[]NoResolve via distru-search-lookups (type PRODUCT_GROUP).
maxRowsLimitintegerNoRows per page. Defaults to 500.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresenceDescription
nextCursorstringCan be absentPass as cursor to fetch the next page. Present only when meta.truncated.
metaobjectAlways
meta.reportstringAlways
meta.dateRangestringAlways
meta.rowLimitnumberAlways
meta.offsetnumberAlways
meta.rowCountnumberAlways
meta.totalRowCountnumberAlways
meta.truncatedbooleanAlways
meta.columnsobject[]Always
meta.columns[].keystringAlways
meta.columns[].labelstringAlways
rowsobject[]Always
rows[].namestringAlways
rows[].productIdstringAlways
rows[].skustringAlways
rows[].vendorstringAlways
rows[].vendorIdstringAlways
rows[].unitTypestringAlways
rows[].categorystringAlways
rows[].subcategorystringCan be null
rows[].groupstringCan be null
rows[].ownerstringCan be null
rows[].activeQuantitystringAlways
rows[].activeQuantityPassedTestingstringCan be null
rows[].assemblingQuantitystringAlways
rows[].reservedQuantitystringAlways
rows[].availableQuantitystringAlways
rows[].incomingQuantitystringAlways
rows[].pendingOutputQuantitystringAlways
rows[].unitCoststringCan be null
rows[].unitPricestringAlways
rows[].inventoryThresholdMaxstringCan be null
rows[].inventoryThresholdMinstringCan be null
rows[].activeValuestringAlways
rows[].imageUrlstringCan be null
rows[].brandstringCan be null
rows[].brandIdstringCan be null
rows[].customFieldsobject[]Always
rows[].customFields[].keystringAlways
rows[].customFields[].labelstringAlways
rows[].customFields[].valuestringCan be null
What the AI reads

Current stock per product: one row per product with its quantities by state (active, assembling, reserved, available, incoming, pending output), unit cost and price, alert thresholds and the value of its active stock. As of now only. Use for stock levels, stock value and products under or over their thresholds. For stock by location, batch or package, or as of a past date, use distru-report-inventory-assets; for stock movements use distru-report-inventory-transaction-history. activeQuantity is only stock free in inventory, so stock being assembled, sold, returned or transferred is already out of it; never subtract assemblingQuantity from it. activeQuantityPassedTesting is the part of activeQuantity held in packages whose lab test or retest passed, not listed in meta.columns; null for batch- and product-tracked products. availableQuantity is active minus reserved and can be negative; incomingQuantity is ordered on purchases but not yet received, drafts included; pendingOutputQuantity is still owed by open assemblies and not yet in active. Every matching active product gets a row, with 0 quantities when it has no stock. Rows come by available quantity, highest first. Every value is a numeric string. Returns 500 rows by default (maxRowsLimit, up to 5000). When meta.truncated is true more rows exist: repeat the call with the same filters, any date range made explicit so every page covers the same one, and cursor set to nextCursor — or narrow the filters when you need a summary rather than every row.