Skip to main content

system.mes.inventory.getLot

Description

Retrieves an Inventory Lots record by its ID.

Syntax

system.mes.inventory.getLot(id)

Parameters

ParameterTypeNullableDescription
idString (ULID)FalseThe ID of the inventory lots to retrieve.

Returns

Returns a JSON representation of the inventory lot. Returns nothing if no inventory lot is found.

NameTypeDescription
idString (ULID)Unique identifier for the inventory lot.
notesStringNotes associated with the inventory lot.
enabledBooleanIndicates whether the inventory lot is enabled (default: true).
spare1StringExtra field 1 for additional context.
spare2StringExtra field 2 for additional context.
spare3StringExtra field 3 for additional context.
nameStringThe name of the inventory lot.
materialIdString (ULID)The id of the material in the inventory lot.
materialPathStringThe path of the material in the inventory lot.
materialNameStringThe name of the material in the inventory lot.
materialQuantityFormatStringThe quantity format of the material in the inventory lot.
statusLotStatusThe status of the inventory lot (default: OPEN).
totalQuantityDoubleThe total quantity of material added to the inventory lot (default: 0.0).
unitOfMeasureIdString (ULID)The id of the unit of measure of the material in the inventory lot.
unitOfMeasureNameStringThe name of the unit of measure of the material in the inventory lot.
unitOfMeasureSymbolStringThe symbol of the unit of measure of the material in the inventory lot.
expirationDateInstantThe expected expiration date of the inventory lot.
closedDateInstantThe date that this inventory lot was closed.
createdDateInstantThe date that this inventory lot was created.

Code Examples

# Retrieve a inventory lot by ID
lot = system.mes.inventory.getLot('01JE6F0CE9-T94PZD8R-TH9J01TJ')

# Output the inventory lot
print(lot)