Receive one delivery of several lots, all or none
Any lab member, or a read-write API token, may receive a shipment. --lines is a JSON array of up to 20 lots: material, lot_number, unit and quantity are required; new_unit, client_line_id, location_id, shelf_id, stock, expires_on, content_per_unit, content_unit, storage_temperature_from_c, storage_temperature_to_c, humidity and handling_notes are optional. The storage temperatures are numbers in Celsius; they, humidity and handling_notes are recorded only when the shipment creates the material, from the first line that names it: later lines' values are ignored. A line with a location_id is stocked there in full. shelf_id optionally names an active shelf in the selected location. stock splits a line across places instead, as [{location_id, shelf_id, quantity}]; what no place takes waits to be put away, as does a line with neither. A line without a client_line_id is named by its position. Use new_unit: true on each line that deliberately adds a counted unit, or --new-unit CLIENT_LINE_ID (line-0 for the first unnamed line). List known units with labbench lots units. Measures remain refused. If any line is refused, nothing is recorded and the error names the line (0-based). Each run sends an idempotency key and prints it: a dropped connection is retried within the run under that key, so it records once. If a run fails without an answer, rerun it with the same --idempotency-key and flags: the API replays the first shipment instead of recording a second. The same key with other content is refused with idempotency_key_reused.
labbench lots receive-shipment [flags]
labbench lots receive-shipment --lines <lines> --name <name> --supplier <supplier>
| Flag | Type | Default | Description |
|---|---|---|---|
--arrived-on | string | arrival date, YYYY-MM-DD (optional) | |
--idempotency-key | string | shipment key (UUID); resend the same key and flags to retry safely (default: a new one) | |
--lines (required) | string | JSON array of up to 20 lots; a lot may carry storage_temperature_from_c, storage_temperature_to_c, humidity and handling_notes for a new material | |
--name (required) | string | the shipment's name, e.g. "Fisher Scientific ยท Nov 13" | |
--new-unit | stringArray | [] | client_line_id to deliberately add its counted unit; repeat per line |
--order-number | string | the order or receipt number (optional) | |
--supplier (required) | string | who the delivery is from |
Every command also accepts the global flags.