Skip to main content

system.mes.shift.getShiftRecord

Description

Retrieves a Shift Records record by its ID.

Syntax

system.mes.shift.getShiftRecord(id)

Parameters

ParameterTypeNullableDescription
idStringFalseThe ID of the shift record to retrieve.

Returns

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

NameTypeDescription
startDateDateTimeActual start date/time when the shift began.
endDateDateTimeActual end date/time when the shift ended (until stopped).
statusString (Enum)Current status (IDLE, ACTIVE, CLOSED, VERIFIED).
locationIdString (ULID)The ULID of the location where the shift runs.
shiftIdString (ULID)The ULID of the shift configuration this record belongs to.
idString (ULID)The ULID of the shift record.
notesStringNotes related to the record.
enabledBooleanIndicates if the record is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

record = system.mes.shift.getShiftRecord('01JAP8RJBN-8ZTPXSGY-J9GSDPE1')
print(record)