Versions
Multiple versions of this document exist:
- 8.0.0 - 8.2.x: This document
- 8.3.0+
In Eyelit MES-M, ‘Schedule’ refers to a scheduled job, also referred to as a works order, production order or job.
List
The Schedule – List API call reads existing Schedule Jobs from Eyelit MES-M. The data can be filtered based on the parameters passed in the body of the JSON packet giving the flexibility to search for one or multiple Scheduled Jobs.
Using the Schedule – List API call has no impact on the data within the given Eyelit MES-M application, it is read-only.
Figure 1 - Logic within Schedule/List API Call
Data Prerequisites
There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list Scheduled Jobs. If parameters are passed in through the body that return no valid results, an empty payload will be returned.
Request
Table 2 shows the method and endpoint required to make the API call to list Scheduled Jobs.
Table 2 - Outbound Message Detail for Schedule - List
Method | URL Structure | Endpoint |
POST | https://[environment].mestec.net | /api/Schedule/List |
The body of the payload should follow the format below.
See Table 3 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 3 - Parameter Information for Schedule - List
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
id | schedule.id | NUMBER | No | N/A | Exact |
orderno | schedule.orderNo | VARCHAR2(250 BYTE) | No | No | Exact |
Note: For any fields where the match type is ‘Like’, a percent symbol should be used as a wildcard character to indicate a number of characters within the given string.
Sample Request
See below for sample use cases with examples of the JSON payload format required.
To list all Scheduled Jobs:
To list Scheduled Jobs where the Order No is ‘ABC’:
Response
When using the Schedule – List API call, if any data has been found in Eyelit MES-M that meets the parameter values passed in the original payload, a JSON payload will be returned containing data in the following structure:
Sample Response
See below for sample use cases with examples of the JSON payload format returned.
No results were found that matched given parameters:
Single scheduled Job found that matches given parameters:
Upsert
When the Schedule ID is omitted, a new Scheduled Job will be created.
See Figure 2 for logic.
Figure 2 - Logic within Schedule/Upsert API Call
Data Prerequisites
An active product, workflow version and BoM version must exist, at minimum, to be able to create a Scheduled Job in Eyelit MES-M. A recipe can be created either manually in Eyelit MES-M as a pre-requisite to the use of the Schedule – Upsert Public API endpoint, or can be created through use of the endpoint.
Request
Table 4 shows the method and endpoint required to make the API call to Upsert Scheduled Jobs.
Table 4 - Outbound Message Detail for Schedule - Upsert
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/Schedule/Upsert |
The body of the payload should follow the format below.
See Table 5 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 5 - Parameter Information for Schedule - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory |
| Case Sensitive | Match Type |
|
|
| Create | Update |
|
|
id | schedule.id | NUMBER | N/A | Yes | N/A | Exact |
suid | schedule.suid | VARCHAR2(200 BYTE) | No | No | N/A | N/A |
orderNo | Schedule.orderno | VARCHAR2(50 BYTE) | No | No | N/A | N/A |
batchNo | Schedule.batchno | VARCHAR2(50 BYTE) | No | No | N/A | N/A |
qty | Schedule.qty | NUMBER | Yes | No | N/A | N/A |
description | Schedule.description | VARCHAR2(500) | No | No | N/A | N/A |
estimatedTimePerUnit | Schedule.estimatedtimeperunit | NUMBER | No | No | N/A | N/A |
itemVersion | Schedule.itemversion | VARCHAR2(50) | No | No | N/A | N/A |
isReleased | Schedule.isreleased | BOOL | Yes | No | N/A | N/A |
batchSize | Schedule.batchsize | FLOAT | No | No | N/A | N/A |
onHold | Schedule.onhold | BOOL | Yes | No | N/A | N/A |
holdReason | Holdreason.name | VARCHAR2(50) | No1 | No | No | Exact |
jobType | Jobtype.name | VARCHAR2(20) | No | No | No | Exact |
jobStatus | Jobstatus.name | VARCHAR2(20) | No | No | No | Exact |
salesOrderRef | Schedule.salesorderref | VARCHAR2(50) | No | No | N/A | N/A |
dueDate | Schedule.duedate | TIMESTAMP(6) | No | No | N/A | N/A |
endDate | Schedule.enddate | TIMESTAMP(6) | No | No | N/A | N/A |
startDate | Schedule.startdate | TIMESTAMP(6) | No | No | N/A | N/A |
jobPriority | Jobpririty.name | VARCHAR2(100) | No | No | No | Exact |
customer | Organisation.name | NVARCHAR2(255) | No | No | No | Exact |
uom | Unitofmeasure.unitname | VARCHAR2(30) | No | No | No | Exact |
properties |
| JSON Array | No | No | N/A | N/A |
name | Property.name | VARCHAR2(50) | No | No | No | Exact |
value | Scheduleprop.value | VARCHAR2(500) | No | No | N/A | N/A |
serialNos | Jobserialno.serialno | VARCHAR2(50) (JSON Array) | No | No | N/A | N/A |
notes | Tablepropertylog.comments | VARCHAR2(3000) (JSON Array) | No | No | N/A | N/A |
recipe |
|
|
|
|
|
|
recipename | Recipe.name | VARCHAR2(200) | No | No | No | Exact |
productname | Product.name | VARCHAR2(50) | No2 | No | No | Exact |
bomname | Bom.name | VARCHAR2(100) | No2 | No | No | Exact |
workflowname | Workflow.name | NVARCHAR2(200) | No2 | No | No | Exact |
bomversion | Bomversion.majorversion Bomversion.minorversion | VARCHAR2(10) X.X | No | No | N/A | Concatenated |
workflowversion | Workflowversion.majorversion Workflowversion.minorversion | VARCHAR2(10) X.X | No | No | N/A | Concatenated |
recipestatus | Approvalstatus.name | VARCHAR2(50) Pending Approval/Approved | No | No | No | Exact |
Note: For any fields where the match type is ‘Concatenated’, each element of the input will be compared to an Eyelit MES-M field.
Sample Request
See below for sample use cases with examples of the JSON payload format required.
To create a Schedule Job:
To update due date by ID:
Response
When using the Schedule – Upsert API call, if a Scheduled Job has been created or updated, a JSON payload will be returned containing data in the following structure:
Sample Response
See below for sample use cases with examples of the JSON payload format returned.
Delete
The Schedule – Delete API call attempts to delete a Scheduled Job. A Scheduled Job can be deleted as long as it has not been started.
Figure 3 shows the logic used within the Schedule – Delete API call.
Figure 3 - Logic within Schedule/Delete API Call
Data Prerequisites
In order to delete a Scheduled Job it must exist in Eyelit MES-M and not have been started.
Request
Table 6 shows the method and endpoint required to make the API call to delete a Scheduled Job.
Table 6 - Outbound Message Detail for Schedule - Delete
Method | URL Structure | Endpoint |
DELETE | https://[environment].mestec.net | /api/Schedule/Delete |
The body of the payload should follow the format below.
See Table 7 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 7 - Parameter Information for Schedule - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | schedule.id | NUMBER | No | N/A | Exact |
Sample Request
See below for sample use cases with examples of the JSON payload format required.
Delete by ID
Response
When using the Schedule – Delete API call, if a Scheduled Job has been Deleted a 200 status response will be returned.