Get Metrc items
Changed onGet the Metrc items — the item definitions Distru caches from Metrc — across your licenses, filtered by various attributes. Results are ordered by Metrc's item id ascending and scoped to the company that owns the API key.
Each row mirrors an item as it exists in Metrc (name, product category, strain, unit of measure, quantity type), plus Distru's unit_type resolved by matching the item's Metrc unit of measure to one of your company's unit types by name (null when no unit type matches that name), and the owning license. Items deleted in Metrc are included by default — use is_deleted to return only live or only deleted items.
This is a read-only cache: it does not create, edit, or delete items in Metrc. Data is eventually consistent — changes synced from Metrc can take up to ~1 second to appear here.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Query parameters
Filter to items belonging to this license, given as a Distru license resource ID (as returned by the licenses endpoint — not a Metrc or state license number). Omit to return items across all of the company's licenses; a license ID that doesn't belong to your company simply returns no items.
Filter to items belonging to the Metrc license with this license number (exact match, not a substring). A convenience alternative to license_id; combining the two is a 400. Unlike license_id, an unknown value is rejected — if your company has no Metrc license with this number the request fails with a 400.
Filter to items whose Metrc name contains this value (case-insensitive substring match against the item's name).
Filter by the item's quantity category, matched against its Metrc quantity type: COUNT (count-based), VOLUME (volume-based), or WEIGHT (weight-based). Omit to return all categories.
Filter to items whose Metrc product category name exactly matches one of the given values — an item matches if its category_name equals any listed value (OR semantics). Case-sensitive: values must match the Metrc category name verbatim. An empty list is ignored (returns items unfiltered by this parameter).
Filter by whether the item is deleted in Metrc. true returns only deleted items; false returns only live items. Omit to return both.
Filter to items with these Metrc item identifiers — Metrc's own integer IDs (the id in the response), not Distru IDs. Matches an item if its Metrc ID equals any of the listed values (OR semantics). An empty list is ignored (returns items unfiltered by this parameter).
Filter by when Distru last fetched the item from Metrc (the fetched_datetime in the response). Accepts a comma-separated from,to range (ISO-8601 UTC); either side may be omitted, e.g. ,2022-07-10T00:00:00Z returns items last fetched on or before that time.
Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.
Response
A list of Metrc items
Example response
{
"data": [
{
"license": {
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_number": "C11-1234567890"
}
}
]
}Changes
- breaking
removed the required property
//from the response with the status - warning
deleted the
queryrequest parameterinserted_datetime - warning
deleted the
queryrequest parametermetrc_ids - warning
deleted the
queryrequest parameterupdated_datetime - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - info
added the new optional
queryrequest parameterfetched_datetime - info
added the new optional
queryrequest parameterids - info
added the new optional
queryrequest parameterlicense_number - info
added the optional property
//to the response with the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
the response property
//became required for the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status
- breaking