---
title: "Split a package"
method: POST
path: "/public/v1/assemblies/split_package"
tags: ["Assembly"]
---

# Split a package

`POST /public/v1/assemblies/split_package`

Split a single Metrc source package into multiple output packages.

Creates one assembly containing every input and output. On success each output package is
queued for creation in Metrc and synced asynchronously — the Metrc package identifiers are
not present in the immediate response, and the source and output packages are briefly flagged
as syncing.

Metrc licenses only. Up to 300 outputs per request. The whole split is applied atomically:
if any output is rejected, none are created.

Required permission: `assemblies_permissions_create`.

## Request body

- SplitPackageRequest — A Metrc source package and the output packages to split it into
  - `outputs` SplitPackageOutput[], required — The output packages to create, between 1 and 300
    - `batch_number` string — Distru batch number stored on the output package.
    - `bin_ids` string[] — Bins to store the output package in (requires bin inventory tracking enabled for the company). Optional; omit or send an empty array to assign no bins.
    - `compliance_label` string, required — The Metrc tag for the new package. Must be an available tag in the source package's license.
    - `copy_custom_data_from_input` boolean — When true, copies the source package's custom field values onto the output package.
    - `costs` CostEntryInput[] — Costs to apply to the output package. Optional.
      - `cost_per_unit` number — Per-unit amount as a decimal (e.g. "10.00"). When omitted, the cost type's own cost per unit is used. Must be omitted for cost types with a locked cost per unit (those that don't allow inline editing) — sending it for such a type is rejected. It is only required when an inline-editable cost type has no cost per unit of its own
      - `cost_type_id` string, required — Required. The cost type to apply, given as its ID from GET /public/v1/cost-types. Must exist and be accessible to the authenticated company
      - `description` string — Optional free-form text stored on the cost
      - `quantity` number, required — Required. How many units of the cost type to apply, as a decimal (e.g. "2.5"). Must be greater than 0. The amount added to each record's cost basis is cost_per_unit × quantity
    - `expiration_date` string — Expiration date reported to Metrc, e.g. "2027-08-19".
    - `input_compliance_quantity` number, required — Amount drawn from the source package, in the source package's compliance unit. Must be > 0.
    - `location_id` string, required — The output location ID. Must be in the same Metrc license as the source package.
    - `metrc_item_id` integer — The Metrc item id for the output. Required unless use_same_item is true, and must be omitted when it is. Must exist in the source package's Metrc license.
    - `metrc_notes` string — Notes sent to Metrc as the output package's note when it is created (max 255 characters).
    - `metrc_production_batch_number` string — When set, flags the output as a Metrc production batch with this batch number.
    - `output_compliance_quantity` number, required — Size of the new package, in the output package's compliance unit (the source unit when use_same_item is true, otherwise the unit of metrc_item_id). Must be > 0.
    - `package_date` string — The output package's packaged date. Defaults to today when omitted.
    - `product_id` string, required — The output product ID. Must be package-tracked.
    - `use_same_item` boolean — When true, the output package reuses the source package's Metrc item and metrc_item_id must be omitted.
  - `source_package_id` string, required — The package to split. Must be package-tracked and in a Metrc license. An ID that doesn't exist for your company returns 404.

## Response `201`

The created assembly

## Other responses

- `400` — Invalid parameters
- `401` — Missing or invalid API token
- `403` — The API token lacks the required permission
- `404` — Not Found

## Changes

- **2026-09-04** `f8930b2c2924` — 2 info
  - added the non-success response with the status `404`
  - added the optional property `data/outputs/items/lab_test_batches` to the response with the `201` status

[Change history](https://skmtc.dev/distru/apis/distru-api/changes/public/v1/assemblies/split_package/post.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-service-production.skmtc.workers.dev/v1/apis/distru/distru-api/revisions/f8930b2c2924/schema)
