Metrc

Get Metrc strains

Changed on

Get the Metrc strains — the strain definitions Distru caches from Metrc — across your licenses, filtered by various attributes. Results are ordered by Metrc's strain id ascending and scoped to the company that owns the API key.

Each row mirrors a strain as it exists in Metrc (name, genetics, testing status, THC/CBD levels, indica/sativa split), plus the owning license. Strains deleted in Metrc are included by default — use is_deleted to return only live or only deleted strains. Strain names appear on Metrc items (the strain.name returned by GET /public/v1/metrc/items) and are required when creating items for strain-bearing product categories.

This is a read-only cache: it does not create, edit, or delete strains in Metrc. Data is eventually consistent — changes synced from Metrc can take up to ~1 second to appear here.

get/public/v1/metrc/strains

Request

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

Query parameters

license_idstring

Filter to strains 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 strains across all of the company's licenses; a license ID that doesn't belong to your company simply returns no strains.

license_numberstring

Filter to strains 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 strains whose Metrc name contains this value (case-insensitive substring match against the strain's name).

is_deletedboolean

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

idsinteger[]

Filter to strains with these Metrc strain identifiers — Metrc's own integer IDs (the id in the response), not Distru IDs. Matches a strain if its Metrc ID equals any of the listed values (OR semantics). An empty list is ignored (returns strains unfiltered by this parameter). At most 200 IDs may be given.

fetched_datetimestring

Filter by when Distru last fetched the strain 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 strains 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 strains

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