Package

Import Metrc packages into Distru. Distru never imports Metrc packages on its own — there is no auto-import. Whenever new packages appear under your license in Metrc — you accept an incoming transfer, you create packages directly in Metrc, or you bring your pre-existing Metrc inventory into Distru when onboarding — those packages exist only in Metrc until you explicitly import them, either on the import screen in the Distru app or through this endpoint. Importing creates a Distru package for each Metrc package, linked to one of your products, and places its full Metrc quantity as active inventory in a destination location; from then on the package can be sold, assembled, and otherwise operated on in Distru.

Each entry identifies its Metrc package by exactly one of compliance_label — the full 24-character Metrc tag, the label returned by GET /public/v1/metrc/packages — or metrc_package_id, Metrc's integer package id (the id returned by the same endpoint); use whichever is more convenient, including a mix across entries, but referencing the same Metrc package twice is rejected. All packages in one request must belong to the same license. Only packages that are active or on hold in Metrc and have quantity left can be imported; finished, discontinued and transferred-out packages, empty packages, and packages that were already imported are rejected.

Each entry's location_id names the destination location for its imported inventory, so one request can import into several locations of the license. When omitted on an entry, it defaults to the license's intake location (the intake_location returned by GET /public/v1/licenses); omitting it when the license has no intake location configured is rejected.

product_id links each package to one of your package-tracked products, whose unit type must measure the same way as the package's Metrc unit (weight, volume or count). We recommend passing it explicitly so you are certain which product each package lands on, but omitting it and letting Distru infer the product can simplify your integration. Every Metrc package references a Metrc item — the Metrc-side definition of what the package contains, with an id and a name. When product_id is omitted, Distru matches the package's Metrc item against your package-tracked products the same way the import screen in the Distru app does, in this order: • the product you most recently imported a package of the same Metrc item as, under the same license • a product whose name equals the Metrc item's name (case-insensitive) • when neither exists: the product of the previously imported Metrc item whose name most resembles this one's, if the two names are at least a 70% match

If no product can be inferred, that entry is rejected with a 400 pointing at its product_id — pass it explicitly. Every successful import is remembered, so future imports of the same Metrc item default to the product you chose.

cost_per_unit optionally records what one unit of the package cost you, feeding cost tracking and per-package cost breakdowns. Setting it requires the costs_permissions_apply_on_package_import permission (403 otherwise), and your company's cost settings may require a cost on every imported package.

This operation is atomic: if any entry is rejected, nothing is imported. Importing is Distru-side only — nothing is pushed to Metrc — but it requires a working Metrc connection and is unavailable for BioTrack companies.

Required permission: metrc_permissions_import_packages.

post/public/v1/packages/import

Request

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

Request body

Response

The imported packages

next_pagestring

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

Changes

    • 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

    • info

      endpoint added