Metrc

Get Metrc transfers

Changed on

Get the Metrc transfers Distru caches from Metrc across your licenses, filtered by various attributes. Results are ordered by Metrc's transfer id ascending and scoped to the company that owns the API key. Only the current version of each transfer is returned. An internal transfer between two of your licenses appears twice — an OUTGOING row on the shipping license and an INCOMING row on the receiving one.

Each row mirrors a transfer's manifest-level facts as they exist in Metrc — shipper, transporter, shipment type — and its deliveries with their packages in manifest order, plus what Distru knows around it: is_importable (with importable_details explaining why not), and the Distru order or purchase created when the transfer was imported (null when it hasn't been).

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

get/public/v1/metrc/transfers

Request

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

Query parameters

license_idstring

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

license_numberstring

Filter to transfers 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.

direction'INCOMING' | 'OUTGOING'

Filter by the transfer's direction relative to the owning license: INCOMING (shipped to it) or OUTGOING (shipped from it). Omit to return both.

is_importableboolean

When true, keep only transfers that can currently be imported into Distru: flagged importable by Metrc's package states, not yet imported, and not marked ignore-for-import in Distru. false and omitted behave the same (no filter).

import_status'IGNORED' | 'IMPORTED' | 'UNIMPORTED'

Filter by the transfer's import_status: • IMPORTED — imported into Distru as a sales order (outgoing), a purchase (incoming), or a stock transfer • IGNORED — not imported and marked ignore-for-import in Distru • UNIMPORTED — neither imported nor ignored, whether or not it is importable Omit to return every status. Combine UNIMPORTED with is_importable=true to keep only the transfers that can be imported now.

manifest_numberstring

Filter to the single transfer whose manifest number equals this value exactly. Use search for substring matching.

idsinteger[]

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

metrc_package_idinteger

Filter to transfers carrying the package with this Metrc package identifier — Metrc's own integer id, the same id returned by GET /public/v1/metrc/packages and by each delivery package in the response.

package_labelstring

Filter to transfers carrying the package with this full 24-character Metrc tag label (case-sensitive exact match).

searchstring

Filter to transfers whose manifest number contains this value (case-insensitive substring match). Must be at least 4 characters; a shorter value is a 400.

search_license_numberstring

Filter to transfers whose shipper license number or any delivery's recipient license number contains this value (case-insensitive substring match). Must be at least 4 characters; a shorter value is a 400. Unlike license_number, which picks the license a transfer belongs to, this matches the facilities on the manifest.

fetched_datetimestring

Filter by when Distru last fetched the transfer 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 transfers 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 transfers

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

      the response property // became optional for the status

    • info

      added the new optional query request parameter import_status

    • info

      added the new optional query request parameter search_license_number

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status