---
title: "Get Metrc lab test batches"
method: GET
path: "/public/v1/metrc/lab-test-batches"
tags: ["Metrc"]
---

# Get Metrc lab test batches

`GET /public/v1/metrc/lab-test-batches`

## Request

- Base URL: `https://app.distru.com`
- URL: `https://app.distru.com/public/v1/metrc/lab-test-batches`
- Auth: HTTP bearer

Get the Metrc lab test batches that can be assigned to a test sample package created under the given license, grouped by Metrc item category. Lab test batches are defined by the state in Metrc and vary per license and item category; Distru caches them from Metrc, so this is a read-only view of that cache.

`data` is an object with one key per Metrc item category defined for the license (the `category_name` values returned by [GET /public/v1/metrc/items](#get-metrc-items)), each holding the batches assignable to a test sample of that category. A batch not restricted to specific categories appears under every category. A category with no assignable batches maps to an empty list.

Use this before calling [POST /public/v1/assemblies/create_test_sample](#create-a-test-sample): the sample's `lab_test_batches` values must come from the `name`s listed under the sample item's category, and every batch listed there with `required: true` must be included or the test sample is rejected.

The response is complete (not paginated). `data` is an empty object when the license's Metrc facility type does not use package sample lab test batches — in that case `lab_test_batches` must be omitted when creating a test sample.

Data is eventually consistent — changes synced from Metrc can take up to ~1 second to appear here.

## Query parameters

- `license_id` string
- `license_number` string

## Response `200`

Metrc lab test batches grouped by item category

- MetrcLabTestBatches: The complete set of lab test batches for the given license, keyed by Metrc item category name. Note: This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses.
  - `data` object: An object with one key per Metrc item category defined for the license, each holding the lab test batches assignable to a test sample of that category, sorted by `name`.

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API token
- `403`: The API token lacks the required permission, or team restrictions hide the record

## Changes

- **2026-09-04** `f8930b2c2924`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/distru/apis/distru-api/changes/public/v1/metrc/lab-test-batches/get.md)

---

[API](https://skmtc.dev/distru/apis/distru-api.md) - [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) - [OpenAPI document](https://skmtc.dev/distru/apis/distru-api/revisions/9d851a88e82f?raw)
