Skip to main content

system.mes.inventory.newChangeStatusRequest

Generates an empty non-persisted Change Status Request to provide the structure required by the API to save a new record into the database. This method must be combined with the changeStatus method in order to persist the record.

Syntax

system.mes.inventory.newChangeStatusRequest()

Parameters

ParameterTypeDescription
None-This method does not take any parameters.

Returns

Returns a JSON representation of the newly created Change Status Request object. The following is a list of keys and default values:

KeyDefault Value
typeSTATUS_CHANGE
lotIdnull
newStatusnull
operationIdnull
notesnull
spare1null
spare2null
spare3null

Code Examples

# Generate the object structure for a new change status request object with no initial arguments
new_request = system.mes.inventory.newChangeStatusRequest()

# Set basic attributes for the new change status requestOPOE
new_request['newStatus'] = 'AVAILABLE'
new_request['lotId'] = '01JJCQEJYG-E31FHVTF-JB6WEJTC'
# (You can continue setting other properties as needed here)

# Change the status of the lot
changed_status_request = system.mes.inventory.changeStatus(**new_request)

# Output the JSON representation of the changed status request
print(changed_status_request)