Skip to content

Super Reports

Super Reports

A super report is a report that can also load related Metrc data for each record (lab results, history, source harvests, transactions) using the same include parameter as Supercollections.

Introducing T3 Super Reports

Every super report path is its report path with /super inserted before /report:

  • /v2/packages/active/report/v2/packages/active/super/report

Add includes by repeating the parameter:

https://api.trackandtrace.tools/v2/packages/active/super/report?licenseNumber=...&include=labResults&include=sourceHarvests

The include options for each data type are listed on the Supercollections page, a super report accepts exactly the same values as the matching supercollection.

When to use a super report

Use a report when the columns you need are all on the object itself. It is faster, has a higher rate limit, and returns ten times as many rows.

Use a super report when you need related data that only exists on another Metrc endpoint, the classic case being lab results for each package.

The trade-offs:

Report Super report
Row cap 50,000 5,000
Rate limit 600/minute 180/minute
include support No Yes
Speed Faster Slower

The super report row cap is lower because each include costs one Metrc request per record. See Limits.

One include in tabular formats, many in JSON

With contentType=json you can request as many includes as the request budget allows. With csv, xlsx or googleSheets you can request at most one.

This is a property of the format, not a restriction we chose. All three are a flat grid: rows and columns, nothing else. One include folds into that grid by widening each row. A second include adds a dimension the grid cannot represent; there is no way to put two independent lists of child records on a single row without a cross join that multiplies your row count and misstates the data.

If you need several includes in a spreadsheet, run one super report per include and join them in the sheet.

One row per record, or one row per included record

By default a super report gives you one row per included record. Ask for include=labResults on 500 packages and you get one row per lab result, and a package accumulates a result per analyte per test, so 500 packages can easily become 40,000 rows with the package columns repeated down each block.

That is the right shape when you want the results themselves. It is the wrong shape when you wanted the packages.

rowMode=collapsed gives you one row per package instead:

https://api.trackandtrace.tools/v2/packages/active/super/report?secretKey=YOUR_SECRET_KEY&licenseNumber=EX-00001&include=labResults&rowMode=collapsed&columns=label,item.name,metadata.indexedLabResults.Total_THC.value&contentType=csv
Label,Item Name,Total THC Value
1A4000000000000000000001,Blue Dream,21.4
1A4000000000000000000002,OG Kush,18.9
1A4000000000000000000003,Trim,

The include is still loaded and the metadata fields are still built from it; you are only choosing not to spread the raw results across rows.

rowMode=expanded (default) rowMode=collapsed
Rows One per included record One per record
labResults.* columns Available 400 if requested
metadata.* columns Available Available
Records with no results Omitted Included
rowLimit Counts records, not rows Counts rows exactly

Three things to know:

Child columns are refused, not blanked

With rowMode=collapsed there is no single lab result on the row, so columns=labResults.testTypeName returns 400 rather than an empty column. Use metadata. columns instead , metadata.indexedLabResults, metadata.extractedLabResults and the rest are already summarized one-per-record, or drop rowMode to get the results as rows.

Collapsing rescues records that would otherwise vanish. An expanded report omits any record whose include came back empty: a package with no lab results is simply absent, with nothing in the output to say so. Collapsed output includes it, with the metadata. columns blank.

It costs nothing. Both shapes are built from the same cached result, so rowMode is not part of the report cache key. Running a report and then re-running it with rowMode=collapsed is one trip to Metrc, not two; you can switch back and forth freely while you work out the shape you want.

rowMode applies only to super reports that request an include. Sending it to a plain report returns 400, because there is nothing to collapse.

Next Steps