Import packages
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.
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
The packages to import
application/json- body
packages*array<>Non-empty list of 1 to 300 Metrc packages to import, all belonging to the same license. Referencing the same Metrc package twice in one request is a 400. The import is all-or-nothing: one rejected entry fails the whole request.
The imported packages
*/*- response
A collection of Packages
data?array<>Packages
next_page?stringURL for the next page of results; null when there is no next page
curl -X POST 'https://app.distru.com/public/v1/packages/import' \ -H 'Content-Type: application/json' \ -d '{ "packages": [ { "batch_number": "B1", "compliance_label": "ABCDEF012345670000000199", "location_id": "00000000-0000-0000-0000-0000000001f1", "product_id": "33bdee51-9a6f-42be-bc22-1725c2857061" }, { "metrc_package_id": 201 } ]}'{ "data": [ { "batch_number": "B1", "biotrack_id": null, "biotrack_inventory_type_id": null, "biotrack_net_quantity_per_unit": null, "biotrack_room_id": null, "biotrack_status": null, "biotrack_usable_weight": null, "compliance_label": "ABCDEF012345670000000195", "compliance_product_name": "Buds", "compliance_strain_name": "Cotton Candy", "compliance_transferred_datetime": null, "compliance_type": "METRC", "creator": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "FirstName6183 LastName6185", "id": "00000000-0000-0000-0000-000000000bf8", "inserted_datetime": "2026-10-13T15:03:32.714346Z", "role": { "id": "00000000-0000-0000-0000-000000000c66", "name": "Admin 3172" }, "updated_datetime": "2026-10-13T15:03:32.714346Z" }, "custom_data": [], "description": null, "distru_status": "ACTIVE", "expiration_date": null, "expiration_datetime": null, "finished_datetime": null, "harvest_date": null, "id": "00000000-0000-0000-0000-000000000057", "inactivated_datetime": null, "inserted_datetime": "2026-10-13T15:03:32.893803Z", "is_production_batch": false, "is_test_sample": false, "is_trade_sample": false, "lab_testing_state": "NotSubmitted", "license": { "active": true, "expiry_datetime": "2026-11-13T15:03:32.735086Z", "id": "00000000-0000-0000-0000-0000000000b5", "inserted_datetime": "2026-10-13T15:03:32.735159Z", "issue_datetime": "2026-10-13T15:03:32.735085Z", "license_number": "CDPH-00000196", "license_type": "Small Mixed-Light Tier 1" }, "license_id": "00000000-0000-0000-0000-0000000000b5", "location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company_id": "00000000-0000-0000-0000-0000000007e4", "id": "00000000-0000-0000-0000-00000000022b", "license_id": "00000000-0000-0000-0000-0000000000b5", "name": "Place 552" }, "location_id": "00000000-0000-0000-0000-00000000022b", "metrc_archived_date": null, "metrc_finished_date": null, "metrc_id": 195, "metrc_label": "ABCDEF012345670000000195", "metrc_production_batch_number": null, "metrc_received_datetime": null, "metrc_received_from_manifest_number": null, "metrc_source_harvest_names": null, "metrc_status": "ACTIVE", "metrc_transfer_id": null, "metrc_unit_name": "Grams", "owner": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "FirstName6222 LastName6223", "id": "00000000-0000-0000-0000-000000000c0b", "inserted_datetime": "2026-10-13T15:03:32.767261Z", "role": { "id": "00000000-0000-0000-0000-000000000c79", "name": "Admin 3192" }, "updated_datetime": "2026-10-13T15:03:32.767261Z" }, "packaged_date": "2014-11-29", "primary_test_result": null, "product": { "id": "df56c506-92fd-41d7-937d-86cd6ca7a24c", "name": "Product 1305", "sku": "sku 1306", "updated_datetime": "2026-10-13T15:03:32.786544Z" }, "product_id": "df56c506-92fd-41d7-937d-86cd6ca7a24c", "product_unit_quantity": "10.000000000", "product_unit_type": { "id": "00000000-0000-0000-0000-0000000062e0", "name": "Gram" }, "quantity": "10.000000000", "quantity_active": "10.000000000", "quantity_assembling": "0.000000000", "quantity_available": "10.000000000", "status": "active", "unit_type": { "id": "00000000-0000-0000-0000-0000000062e0", "name": "Gram" } }, { "batch_number": null, "biotrack_id": null, "biotrack_inventory_type_id": null, "biotrack_net_quantity_per_unit": null, "biotrack_room_id": null, "biotrack_status": null, "biotrack_usable_weight": null, "compliance_label": "ABCDEF012345670000000197", "compliance_product_name": "Buds", "compliance_strain_name": "Cotton Candy", "compliance_transferred_datetime": null, "compliance_type": "METRC", "creator": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "FirstName6183 LastName6185", "id": "00000000-0000-0000-0000-000000000bf8", "inserted_datetime": "2026-10-13T15:03:32.714346Z", "role": { "id": "00000000-0000-0000-0000-000000000c66", "name": "Admin 3172" }, "updated_datetime": "2026-10-13T15:03:32.714346Z" }, "custom_data": [], "description": null, "distru_status": "ACTIVE", "expiration_date": null, "expiration_datetime": null, "finished_datetime": null, "harvest_date": null, "id": "00000000-0000-0000-0000-000000000058", "inactivated_datetime": null, "inserted_datetime": "2026-10-13T15:03:32.893803Z", "is_production_batch": false, "is_test_sample": false, "is_trade_sample": false, "lab_testing_state": "NotSubmitted", "license": { "active": true, "expiry_datetime": "2026-11-13T15:03:32.735086Z", "id": "00000000-0000-0000-0000-0000000000b5", "inserted_datetime": "2026-10-13T15:03:32.735159Z", "issue_datetime": "2026-10-13T15:03:32.735085Z", "license_number": "CDPH-00000196", "license_type": "Small Mixed-Light Tier 1" }, "license_id": "00000000-0000-0000-0000-0000000000b5", "location": { "address": "123 Fake Street, Beverly Hills, CA 90210, US", "company_id": "00000000-0000-0000-0000-0000000007e4", "id": "00000000-0000-0000-0000-00000000022a", "license_id": "00000000-0000-0000-0000-0000000000b5", "name": "Place 551" }, "location_id": "00000000-0000-0000-0000-00000000022a", "metrc_archived_date": null, "metrc_finished_date": null, "metrc_id": 197, "metrc_label": "ABCDEF012345670000000197", "metrc_production_batch_number": null, "metrc_received_datetime": null, "metrc_received_from_manifest_number": null, "metrc_source_harvest_names": null, "metrc_status": "ACTIVE", "metrc_transfer_id": null, "metrc_unit_name": "Grams", "owner": { "banned": false, "deleted_at": null, "email": "[email protected]", "full_name": "FirstName6234 LastName6235", "id": "00000000-0000-0000-0000-000000000c11", "inserted_datetime": "2026-10-13T15:03:32.793410Z", "role": { "id": "00000000-0000-0000-0000-000000000c80", "name": "Admin 3199" }, "updated_datetime": "2026-10-13T15:03:32.793410Z" }, "packaged_date": "2014-11-29", "primary_test_result": null, "product": { "id": "79636a39-9522-4793-8df9-36d802343d9c", "name": "Product 1309", "sku": "sku 1310", "updated_datetime": "2026-10-13T15:03:32.809530Z" }, "product_id": "79636a39-9522-4793-8df9-36d802343d9c", "product_unit_quantity": "10.000000000", "product_unit_type": { "id": "00000000-0000-0000-0000-0000000062e0", "name": "Gram" }, "quantity": "10.000000000", "quantity_active": "10.000000000", "quantity_assembling": "0.000000000", "quantity_available": "10.000000000", "status": "active", "unit_type": { "id": "00000000-0000-0000-0000-0000000062e0", "name": "Gram" } } ], "next_page": null}