Inventory assets report

distru-report-inventory-assetsRead

Stock per product and location, split by batch or package, with prices and costs.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
locationIdstringNoResolve via distru-search-locations.
snapshotDatetimestringNoDefaults to now. Not before 2023-08-03T11:00:00Z. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me.
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[].productstringAlways
rows[].productIdstringAlways
rows[].licensestringCan be null
rows[].licenseIdstringCan be null
rows[].locationstringCan be null
rows[].locationIdstringCan be null
rows[].packageNumberstringCan be null
rows[].packageIdstringCan be null
rows[].batchNumberstringCan be null
rows[].batchIdstringCan be null
rows[].skustringAlways
rows[].vendorstringAlways
rows[].vendorIdstringAlways
rows[].ownerstringCan be null
rows[].unitTypestringAlways
rows[].activeQuantitystringAlways
rows[].assemblingQuantitystringAlways
rows[].sellingQuantitystringAlways
rows[].categorystringAlways
rows[].subcategorystringCan be null
rows[].unitPricestringAlways
rows[].unitCostActualstringCan be null
rows[].unitCostDefaultstringCan be null
rows[].totalCostActualstringCan be null
rows[].totalCostDefaultstringCan be null
rows[].expirationDatestringCan be null
rows[].trackingMethodenum
BATCHPACKAGEPRODUCT
Always
rows[].harvestDatestringCan be null
rows[].labTestingStateenum
FAILEDNOT_TESTEDPASSEDPENDING
Can be null
rows[].customFieldsobject[]Always
rows[].customFields[].keystringAlways
rows[].customFields[].labelstringAlways
rows[].customFields[].valuestringCan be null
What the AI reads

Stock per asset: one row per product at a location, split by batch or package when the product is tracked that way, with active, assembling and selling quantities, unit price and costs. A snapshot as of now or snapshotDatetime. Use for stock by location, batch or package, inventory cost, or stock at a past date. For one row per product with reserved, available and incoming quantities use distru-report-inventory-valuation; for stock movements use distru-report-inventory-transaction-history. *Actual costs are the traced cost of the inputs that produced the stock; *Default values those inputs at their configured unit cost (the cost type's, else the product's). The four cost fields are null and left out of meta.columns when the caller cannot view costs. An inactive product's name ends in " (INACTIVE)". Slow: it rebuilds every stock row the company holds, so narrow by location or product and keep maxRowsLimit low. Quantities and money are numeric strings; expirationDate and harvestDate are YYYY-MM-DD. labTestingState is the package's current state, even for a past snapshotDatetime; null when the asset is not package-tracked. 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.