Skip to main content

system.mes.location.getLocation

Description

Retrieves a Locations record by its ID or path.

Syntax

system.mes.location.getLocation(idOrPath)

Parameters

ParameterTypeDescription
idOrPathStringThe ID or path of the location to retrieve.

Returns

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

NameTypeDescription
nameStringThe name of the location.
descriptionStringA detailed description of the location.
parentIdString (ULID)The ULID of the parent location.
typeStringThe type of the location (e.g., ENTERPRISE, COMPANY, SITE, AREA, LINE, CELL_GROUP, CELL, UNIT).
processTypeStringThe process type for the location (e.g., STORAGE, CONTINUOUS, BATCH, DISCRETE, NONE).
sortOrderIntegerDetermines the display order of the location.
allowNegativeInventoryBooleanAllows inventory to go negative at this location.
storageCapacityDoubleMaximum storage capacity allowed at the location.
storageCapacityUnitIdString (ULID)The ULID for the storage capacity unit to be used as the default unit of measure for this location. See unit_of_measure.
lotStorageStrategyStringDefines the lot storage strategy (e.g, ALLOW_MULTIPLE, ALLOW_SINGLE_OR_THROW, MERGE_INTO_PREVIOUS, MERGE_INTO_NEW, NO_STORAGE).
lotUseStrategyStringDefines the lot usage strategy, such as FIFO or FEFO.
pathStringPath of the location within the hierarchy.
idString (ULID)The ULID of the location.
notesStringNotes related to the location.
enabledBooleanIndicates if the location is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve a location by ID or path
location = system.mes.location.getLocation('DariyCo/Plant1/Line1')

# Output the location
print(location)