Harvest outputs report

distru-report-harvest-outputsRead

One row per harvest assembly line: harvested material used, products made and costs.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
cursorstringNonextCursor of the previous call; keep the other arguments unchanged.
assemblyDatetimeobjectNoInclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. Assembly creation date. Defaults to the last 7 days.
assemblyDatetime.endstringNo
assemblyDatetime.startstringNo
harvestNamestringNoCase-insensitive substring of an input harvest name.
locationIdstringNoInput location. Resolve via distru-search-locations.
outputProductCategoryIdstringNoOutput product's category. Resolve via distru-search-lookups (type PRODUCT_CATEGORY).
outputProductNamestringNoCase-insensitive substring of an output product name.
statusenum
COMPLETEDPENDING
No
strainstringNoCase-insensitive substring of an input harvest strain.
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[].harvestAssemblyDatestringAlways
rows[].harvestAssemblyNumberstringAlways
rows[].statusenum
COMPLETEDPENDING
Can be null
rows[].harvestNamestringAlways
rows[].outputBatchNumberstringCan be null
rows[].batchIdstringCan be null
rows[].outputPackageNumberstringCan be null
rows[].packageIdstringCan be null
rows[].strainstringCan be null
rows[].locationstringAlways
rows[].locationIdstringAlways
rows[].costInputOutputstringAlways
rows[].distruProductstringCan be null
rows[].productIdstringCan be null
rows[].productCategorystringCan be null
rows[].quantitystringAlways
rows[].unitTypestringCan be null
rows[].unitCostActualstringCan be null
rows[].unitCostDefaultstringCan be null
rows[].totalCostActualstringCan be null
rows[].totalCostDefaultstringCan be null
rows[].costTypestringCan be null
rows[].costTypeDescriptionstringCan be null
rows[].lineItemIdstringAlways
rows[].outputReferenceIdstringCan be null
rows[].customFieldsobject[]Always
rows[].customFields[].keystringAlways
rows[].customFields[].labelstringAlways
rows[].customFields[].valuestringCan be null
What the AI reads

Harvest assembly report: one row per line item of each harvest assembly created in the range: its inputs (harvested material used), outputs (products made, with batch and package numbers) and cost lines; costInputOutput says which. Use for harvest yields, harvest costs and what a harvest produced. For plant batch timelines use distru-report-plant-lifecycle; for individual cultivation events use distru-report-cultivation-transaction-history. Filters pick assemblies, not rows: an assembly matches when one input matches every input filter (harvestName, strain, locationId) and one output every output filter (outputProductName, outputProductCategoryId); then all its input, output and cost rows come back. lineItemId and outputReferenceId only link rows within one report run and are not IDs any other tool accepts; on a cost row, outputReferenceId is the lineItemId of the output the cost belongs to, which is how cost splits across several outputs. The six cost fields are null and left out of meta.columns when the caller cannot view costs. harvestAssemblyDate is MM/DD/YYYY in the caller's timezone; quantities and money are numeric strings. 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.