APIPackage

Get packages

GET
/public/v1/packages

Get packages sorted by their creation date and filtered by various attributes

This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.

Required permission: products_permissions_view. Results are filtered to only include packages the authenticated user can access under their team restrictions.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

inserted_datetime?string

Filter by creation datetime, given as an inclusive after,before range of ISO 8601 timestamps separated by a comma. Either bound may be left empty: after, keeps only packages created on or after after; ,before only those created on or before before; after,before keeps those inside the closed range. A range with both bounds empty is rejected.

page?string

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.

location_ids[]?array<string>

Keep only packages currently stored in any of these Distru location IDs (matches the location.id string in a package). Combined with the other filters by AND; multiple ids inside this filter are OR-ed. Ids that do not resolve to one of your locations simply match nothing.

license_number?string

Keep only packages whose license has exactly this license number (exact string match, not a substring).

ids[]?array<string>

Filter packages by package ID (the same string as each package's id in responses). Multiple ids are OR-ed. Values that do not decode to a known package id match no rows.

product_ids[]?array<string>

Keep only packages of any of these product IDs (matches a package's product_id). Multiple ids are OR-ed.

distru_statuses[]?array<string>

Keep only packages in any of these Distru statuses (multiple values are OR-ed). Case-insensitive. If any value is not one of the statuses below, the filter matches no rows. Allowed values: • ACTIVE — active in both Distru and the compliance system • ASSEMBLING — fully consumed by a pending assembly • DESTROYED — destroyed (BioTrack only; Metrc packages never reach this) • DISCONTINUED — discontinued in Metrc • FINISHED — finished (quantity 0) • ONHOLD — on hold in Metrc (Metrc only) • RETURNING — tied to a Metrc return that has shipped • SELLING — assigned to a Distru sales order • SOLD — sold on a Metrc-enabled sales order • TRANSFERRED — transferred out of its Metrc license

Note: the status field in responses is returned lowercase (e.g. active); this filter accepts either case. (The old statuses filter name still works but is deprecated.)

include_costs?boolean

When true, each package in the response also carries its cost fields (total_cost_actual, total_cost_default, cost_per_unit_actual, cost_per_unit_default). Omitted or false leaves those fields out of the response entirely.

updated_datetime?string

Filter by last-modified datetime, given as an inclusive after,before range of ISO 8601 timestamps separated by a comma, with the same empty-bound rules as inserted_datetime.

custom_data?

Filter by custom field values, as custom_data[{id}]=value where {id} is a custom field's numeric id. Repeat with different ids to filter on several fields at once; a record must match every one (AND). Matching is case-sensitive exact against the value stored on the record. The id must be a filterable custom field defined on this entity — use GET /public/v1/custom-fields?parent_object=package to list the ids, their types, and which are filterable. A non-numeric id, an id not defined on this entity, or an id that isn't filterable returns a 400.

compliance_label?string

Case-insensitive substring match on the package's compliance_label. Must be at least 4 characters; a shorter value is a 400.

compliance_labels[]?array<string>

Keep only packages whose compliance_label exactly matches (case-sensitive) any value in the list — send labels exactly as they appear in responses. Multiple values are OR-ed.

batch_number?string

Case-insensitive substring match on the package's batch_number.

batch_numbers[]?array<string>

Keep only packages whose batch_number exactly matches (case-sensitive) any value in the list — send batch numbers exactly as they appear in responses. Multiple values are OR-ed.

compliance_product_name?string

Case-insensitive substring match on the package's compliance_product_name.

compliance_product_names[]?array<string>

Keep only packages whose compliance_product_name exactly matches (case-insensitive) any value in the list. Multiple values are OR-ed.

license_ids[]?array<string>

Keep only packages whose license is any of these Distru license IDs (matches a package's license_id). Multiple ids are OR-ed; ids that do not resolve match nothing.

bin_ids[]?array<string>

Keep only packages stored in any of these bins (matches an id in a package's bins[].id). Multiple ids are OR-ed.

owner_ids[]?array<string>

Keep only packages owned by any of these users (matches a package's owner.id). Multiple ids are OR-ed.

unit_type_ids[]?array<string>

Keep only packages with any of these unit types (matches a package's unit_type.id). Multiple ids are OR-ed.

product_category_ids[]?array<string>

Keep only packages whose product is in any of these categories (matches the package's product.category.id). Multiple ids are OR-ed.

product_subcategory_ids[]?array<string>

Keep only packages whose product is in any of these subcategories (matches the package's product.subcategory.id). Multiple ids are OR-ed.

product_group_ids[]?array<string>

Keep only packages whose product is in any of these groups (matches the package's product.product_group.id). Multiple ids are OR-ed.

product_brand_ids[]?array<string>

Keep only packages whose product has any of these brands (matches the package's product.brand.id). Multiple ids are OR-ed.

product_vendor_ids[]?array<string>

Keep only packages whose product is supplied by any of these vendors (matches the package's product.vendor.id; this is the company-relationship ID, not the raw company ID). Multiple ids are OR-ed.

product_strain_ids[]?array<string>

Keep only packages whose product has any of these strains (matches the package's product.strain.id). Multiple ids are OR-ed.

product_tag_ids[]?array<string>

Keep only packages whose product carries any of these tags (matches an id in the package's product.tags[].id). Multiple ids are OR-ed.

product_skus[]?array<string>

Keep only packages whose product SKU exactly matches (case-insensitive) any value in the list (matches the package's product.sku). Multiple values are OR-ed.

lab_testing_state?string

Keep only packages whose lab_testing_state exactly equals this value (case-insensitive).

lab_testing_states[]?array<string>

Keep only packages whose lab_testing_state is any of these values (case-insensitive, OR-ed).

expiration_datetime?string

Filter by the package's expiration_datetime, given as an inclusive after,before range of ISO 8601 timestamps separated by a comma, with the same empty-bound rules as inserted_datetime.

finished_datetime?string

Filter by the package's finished_datetime, an inclusive after,before range of ISO 8601 timestamps separated by a comma, same empty-bound rules as inserted_datetime.

inactivated_datetime?string

Filter by the package's inactivated_datetime, an inclusive after,before range of ISO 8601 timestamps separated by a comma, same empty-bound rules as inserted_datetime.

harvest_date?string

Filter by the package's harvest_date, given as an inclusive after,before range of YYYY-MM-DD dates separated by a comma. Either bound may be empty; both empty is rejected.

packaged_date?string

Filter by the package's packaged_date, an inclusive after,before range of YYYY-MM-DD dates separated by a comma, same empty-bound rules as harvest_date.

is_test_sample?boolean

Keep only test-sample (true) or non-test-sample (false) packages. Omit to match either.

is_trade_sample?boolean

Keep only trade-sample (true) or non-trade-sample (false) packages. Omit to match either.

is_production_batch?boolean

Keep only production-batch (true) or non-production-batch (false) packages. Omit to match either.

has_quantity_active?boolean

Keep only packages that currently hold active quantity (true, quantity_active > 0) or none (false, quantity_active = 0). Omit to match either.

has_coa_attached?boolean

Keep only packages whose primary lab result has a file attached (true) or does not (false) — i.e. whether a downloadable COA exists. Omit to match either.

contains_remediated_material?boolean

Keep only packages that contain remediated material (true) or do not (false). Omit to match either.

Response Body

A list of packages

*/*
  1. response

A collection of Packages

data?array<>

Packages

next_page?string

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

Example Request
curl -X GET 'https://app.distru.com/public/v1/packages'
Example Response
{  "data": [    {      "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": "ABCDEF012345670000000203",      "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": "FirstName6534 LastName6535",        "id": "00000000-0000-0000-0000-000000000c9f",        "inserted_datetime": "2026-10-13T15:03:33.141529Z",        "role": {          "id": "00000000-0000-0000-0000-000000000d10",          "name": "Admin 3343"        },        "updated_datetime": "2026-10-13T15:03:33.141529Z"      },      "custom_data": [        {          "id": 82,          "name": "Custom Field 56",          "value": "Custom Field Value 1"        }      ],      "description": null,      "distru_status": "ACTIVE",      "expiration_date": "2024-01-01T00:00:00.000000Z",      "expiration_datetime": "2024-01-01T00:00:00.000000Z",      "finished_datetime": null,      "harvest_date": "2024-06-15",      "id": "00000000-0000-0000-0000-00000000005b",      "inactivated_datetime": null,      "inserted_datetime": "2026-10-13T15:03:33.171011Z",      "is_production_batch": false,      "is_test_sample": false,      "is_trade_sample": true,      "lab_testing_state": "NotSubmitted",      "license": {        "active": true,        "expiry_datetime": "2026-11-13T15:03:33.069302Z",        "id": "00000000-0000-0000-0000-0000000000bc",        "inserted_datetime": "2026-10-13T15:03:33.069400Z",        "issue_datetime": "2026-10-13T15:03:33.069300Z",        "license_number": "CDPH-00000206",        "license_type": "Type 9 Non-Storefront"      },      "license_id": "00000000-0000-0000-0000-0000000000bc",      "location": {        "address": "123 Fake Street, Beverly Hills, CA 90210, US",        "company_id": "00000000-0000-0000-0000-00000000083d",        "id": "00000000-0000-0000-0000-000000000248",        "license_id": "00000000-0000-0000-0000-0000000000bc",        "name": "Place 579"      },      "location_id": "00000000-0000-0000-0000-000000000248",      "metrc_archived_date": null,      "metrc_finished_date": null,      "metrc_id": 203,      "metrc_label": "ABCDEF012345670000000203",      "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": "Ounces",      "owner": {        "banned": false,        "deleted_at": null,        "email": "[email protected]",        "full_name": "FirstName6494 LastName6495",        "id": "00000000-0000-0000-0000-000000000c8c",        "inserted_datetime": "2026-10-13T15:03:33.090096Z",        "role": {          "id": "00000000-0000-0000-0000-000000000cfe",          "name": "Admin 3325"        },        "updated_datetime": "2026-10-13T15:03:33.090096Z"      },      "packaged_date": "2024-07-01",      "primary_test_result": null,      "product": {        "id": "eabc10e8-153d-4133-92aa-6da44920bc61",        "name": "Product 1371",        "sku": "sku 1372",        "updated_datetime": "2026-10-13T15:03:33.111908Z"      },      "product_id": "eabc10e8-153d-4133-92aa-6da44920bc61",      "product_unit_quantity": "7.500000000",      "product_unit_type": {        "id": "00000000-0000-0000-0000-00000000682d",        "name": "3"      },      "quantity": "5.000000000",      "quantity_active": "5.000000000",      "quantity_assembling": "0.000000000",      "quantity_available": "5.000000000",      "status": "active",      "unit_type": {        "id": "00000000-0000-0000-0000-00000000682e",        "name": "2"      }    },    {      "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": "ABCDEF012345670000000207",      "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": "FirstName6632 LastName6633",        "id": "00000000-0000-0000-0000-000000000ccf",        "inserted_datetime": "2026-10-13T15:03:33.258807Z",        "role": {          "id": "00000000-0000-0000-0000-000000000d44",          "name": "Admin 3395"        },        "updated_datetime": "2026-10-13T15:03:33.258807Z"      },      "custom_data": [        {          "id": 82,          "name": "Custom Field 56",          "value": null        }      ],      "description": null,      "distru_status": "ACTIVE",      "expiration_date": null,      "expiration_datetime": null,      "finished_datetime": null,      "harvest_date": null,      "id": "00000000-0000-0000-0000-00000000005d",      "inactivated_datetime": null,      "inserted_datetime": "2026-10-13T15:03:33.300039Z",      "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:33.069302Z",        "id": "00000000-0000-0000-0000-0000000000bc",        "inserted_datetime": "2026-10-13T15:03:33.069400Z",        "issue_datetime": "2026-10-13T15:03:33.069300Z",        "license_number": "CDPH-00000206",        "license_type": "Type 9 Non-Storefront"      },      "license_id": "00000000-0000-0000-0000-0000000000bc",      "location": {        "address": "123 Fake Street, Beverly Hills, CA 90210, US",        "company_id": "00000000-0000-0000-0000-00000000083d",        "id": "00000000-0000-0000-0000-00000000024a",        "license_id": "00000000-0000-0000-0000-0000000000bc",        "name": "Place 581"      },      "location_id": "00000000-0000-0000-0000-00000000024a",      "metrc_archived_date": null,      "metrc_finished_date": null,      "metrc_id": 207,      "metrc_label": "ABCDEF012345670000000207",      "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": "Ounces",      "owner": {        "banned": false,        "deleted_at": null,        "email": "[email protected]",        "full_name": "FirstName6494 LastName6495",        "id": "00000000-0000-0000-0000-000000000c8c",        "inserted_datetime": "2026-10-13T15:03:33.090096Z",        "role": {          "id": "00000000-0000-0000-0000-000000000cfe",          "name": "Admin 3325"        },        "updated_datetime": "2026-10-13T15:03:33.090096Z"      },      "packaged_date": null,      "primary_test_result": {        "cbd_mg_per_unit": "1",        "cbd_mg_per_unit_total": "2",        "cbd_percentage": "3",        "cbd_percentage_total": "4",        "coa_url": null,        "mg_per_unit_type": "mg/mL",        "name": "File.pdf",        "thc_mg_per_unit": "5",        "thc_mg_per_unit_total": "6",        "thc_percentage": "7",        "thc_percentage_total": "8"      },      "product": {        "id": "eabc10e8-153d-4133-92aa-6da44920bc61",        "name": "Product 1371",        "sku": "sku 1372",        "updated_datetime": "2026-10-13T15:03:33.111908Z"      },      "product_id": "eabc10e8-153d-4133-92aa-6da44920bc61",      "product_unit_quantity": "15.000000000",      "product_unit_type": {        "id": "00000000-0000-0000-0000-00000000682d",        "name": "3"      },      "quantity": "20.000000000",      "quantity_active": "20.000000000",      "quantity_assembling": "0.000000000",      "quantity_available": "20.000000000",      "status": "active",      "unit_type": {        "id": "00000000-0000-0000-0000-00000000682f",        "name": "4"      }    }  ],  "next_page": null}