Metrc

Get Metrc items

Changed on

Get 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.

get/public/v1/metrc/items

Request

  • Base URL
    https://app.distru.com
  • Auth
    HTTP bearer

Query parameters

license_idstring

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.

license_numberstring

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.

searchstring

Filter to items whose Metrc name contains this value (case-insensitive substring match against the item's name).

unit_type_category'COUNT' | 'VOLUME' | 'WEIGHT'

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.

category_namesstring[]

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).

is_deletedboolean

Filter by whether the item is deleted in Metrc. true returns only deleted items; false returns only live items. Omit to return both.

idsinteger[]

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).

fetched_datetimestring

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.

pagestring

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

next_pagestring

URL for the next page of results; null when there is no next page

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 query request parameter inserted_datetime

    • warning

      deleted the query request parameter metrc_ids

    • warning

      deleted the query request parameter updated_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 query request parameter fetched_datetime

    • info

      added the new optional query request parameter ids

    • info

      added the new optional query request parameter license_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