Skip to main content

Lot

Lot objects represent batches or lots of manufactured goods that have been produced at a specific time and place and all contain the same input material.

Used only in certain circumstances

This collection is typically used by smaller companies who are using the user interface or spreadsheets to upload their production information. Larger companies would import their batch/lot information directly via EPCIS. Lot information created using this collection does not automatically replicate into EPCIS events - use the "Publish Lot" flow to do this.

The lot Object

Lot records store batch/lot production information including lot number, dates, quantities, product links, and supply chain traceability attributes.

Field NameTypeDescription
idstringPrimary key for the lot. Auto set based on product and lot number if using GS1 IDs.
user_createdobjectUser who created the lot. Read-only. Links to directus_users.
date_createddatetimeTimestamp in ISO 8601 when the lot was created. Read-only.
user_updatedobjectUser who last updated the lot. Read-only. Links to directus_users.
date_updateddatetimeTimestamp in ISO 8601 when the lot was last updated. Read-only.
lot_numberstringThe batch or lot number assigned by the manufacturer.
production_datestringDate the lot was produced (ISO 8601 date, e.g., "2024-12-17").
digital_linkstringGS1 Digital Link URL for the lot.
quantitynumberQuantity of items or units in this lot.
expiry_datestringExpiry date for the lot (ISO 8601 date).
best_before_datestringBest before date for the lot (ISO 8601 date).
sell_by_datestringSell by date for the lot (ISO 8601 date).
statusstringCurrent status of the lot (e.g., "draft", "published").
uomobjectUnit of measure for the lot quantity. Links to ref_uom.
production_locationobjectLocation where the lot was produced. Links to location.
productobjectProduct this lot belongs to. Links to product.
accountobjectAccount associated with this lot. (Multi-tenant installations only)
harvest_start_datestringStart date of the harvest period (ISO 8601 date).
harvest_end_datestringEnd date of the harvest period (ISO 8601 date).
quality_reportobjectQuality report document for this lot. Links to directus_files.
input_materialarray of objectsInput materials/ingredients used in producing this lot.
catch_information_listarray of objectsSeafood catch information records for this lot.

Sub-Objects

User Object (user_created, user_updated)

See Users for the full schema.

Account Object (account)

See Account for the full schema.

Unit of Measure Object (uom)

See Unit of Measurement for the full schema.

Location Object (production_location)

See Location for the full schema.

Product Object (product)

See Product for the full schema.

File Object (quality_report)

See Files for the full schema.


List Lots

List existing lots.

GET /items/lot

Query Parameters

Supports all global query parameters.

Returns

An array of up to limit lot objects. If no items are available, data will be an empty array.


Retrieve a Lot

Retrieve a specific lot by ID.

GET /items/lot/:id

Returns

Returns a lot object if a valid primary key was provided.


Create a Lot

Create a new lot.

POST /items/lot

{
"lot_number": "LOT-2024-001",
"production_date": "2024-12-17",
"expiry_date": "2025-06-17",
"quantity": "1000.00",
"status": "draft",
"product": "/01/94444444444447",
"production_location": "/414/4444444100012",
"uom": "KGM"
}

Query Parameters

Supports all global query parameters.

Request Body

A partial lot object.

Returns

Returns the lot object for the created lot.


Update a Lot

Update an existing lot.

PATCH /items/lot/:id

{
"status": "published",
"quantity": "1200.00"
}

Query Parameters

Supports all global query parameters.

Request Body

A partial lot object.

Returns

Returns the lot object for the updated lot.


Delete a Lot

Delete an existing lot.

DELETE /items/lot/:id

Returns

Empty body.