Batches
Last updated on November 19, 2026
A batch groups Units you produced together, such as a manufacturing lot, a build day, or a contract manufacturer shipment. You can use batches to compare yield across production Runs, isolate a defective lot, and correlate failures with assembly conditions.
Identity
A batch is a thin record whose identity is its number.
| Field | Type | Required | Notes |
|---|---|---|---|
number | string | yes | 1-60 chars, ^[a-zA-Z0-9_.:+-]+$, unique per org (case-insensitive). |
A batch holds no other fields. Identity is the number, and everything else derives from the units linked to it.
Lifecycle
You can create batches three ways, depending on how your workflow ingests new cohorts.
- First Run. Calling
runs.createwith a newbatch_numbercreates the batch alongside the unit, Part, and Revision. - API. Call
batches.createto pre-allocate cohorts before production starts. - Dashboard. Create from Inventory → Batches → New Batch.
A unit is linked to a batch by batch_number at creation, or you can assign it later from the unit page.
When you delete a batch, the batch_number on its units is unset but the units themselves are kept. Batches with zero units are auto-deleted after a unit unlink, so the list never accumulates empty batches.
In the dashboard
Open Inventory → Batches to manage batches.
List columns: batch number, unit count, and created-at (with creator info for the user or station).
Filters: part, revision, created-at range, and search by batch number.
Actions: create a batch, edit the batch number inline, bulk add or remove units through a search-and-select dialog, and jump to the units filtered by batch.
Limits
A few hard limits apply to batches.
- Batch number: 1-60 characters.
- No limit on units per batch.
API
The API exposes batches.create, list, get, update, and delete. See the REST API reference for filtering units by batch.
from tofupilot.v2 import TofuPilot
client = TofuPilot()
client.batches.create(number="BATCH-2026-04-12")
client.units.create(
serial_number="SN-200",
part_number="PCB-V1",
batch_number="BATCH-2026-04-12",
)
client.units.list(batch_numbers=["BATCH-2026-04-12"])How is this guide?
Parts and Revisions
Learn how to organize product families and their design versions with TofuPilot Parts and Revisions to compare yield across hardware generations.
InstrumentsPreview
Learn how TofuPilot records the instruments behind every run: each plug's maker, model, serial number and firmware, the measurements it took and the logs it wrote.