Versions
Versions this documentation is relevant for:
- 8.7.0+
List
The Work Centre – List API call reads existing Work Centres from Eyelit MES-M. The data can be filtered based on the parameters passed in the body/payload of the JSON packet giving the flexibility to search for one or multiple Work Centre Groups.
Using the Work Centre– List API call has no impact on the data within the given Eyelit MES-M application, it is read-only.
Figure 1 shows the logic used within the Work Centre – List API call.
Figure 1 - Logic within Work Centre/List API Call
Prerequisites
There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list Work Centres. If parameters are passed in through the body that return no valid results, an empty payload will be returned.
Request
Table 1 shows the method and endpoint required to make the API call to list Work Centre.
Table 1 - Outbound Message Detail for Work Centre - List4
Method | URL Structure | Endpoint |
POST | https://[environment].mestec.net | /api/WorkCentre/List |
The body of the payload should follow the format below.
See Table 2 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 2 - Parameter Information for Work Centre - List
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | Work Centre.id | NUMBER | No | N/A | Exact |
Name | Work Centre.name | VARCHAR2(250 BYTE) | No | No | Exact |
SUID | Work Centre.suid | VARCHAR2(250 BYTE) | No | No | Exact |
WorkcentreGroup | Work Centregroup.name | VARCHAR2(250 BYTE) | No |
|
|
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 Work Centre where the name is ‘Controlled’:
Response
When using the Work Centre – 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:
Work Centre found that matched given parameters:
Upsert
The Work Centre – Upsert API call checks if a Work Centre with the given ID already exists. If it does, appropriate fields are updated in the matching Work Centre in Eyelit MES-M. If the ID value is omitted, a new Work Centre will be created.
Figure 2 shows the logic used within the Work Centre – Upsert API call
Figure 2- Logic within Work Centre/Upsert API Call
Prerequisites
When creating or updating a Work Centre, the following entities must already exist in Eyelit MES-M in order to be referenced.
Work Centre Type
Ownership Type
Currency
Unit of Measure (Base Unit)
Location
Receipt Profile
Receipt Recipe
Serial Range
Request
Table 3 shows the method and endpoint required to make the API call to list Work Centre.
Table 3 - Outbound Message Detail for Work Centre - Upsert
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/WorkCentre/Upsert |
The body of the payload should follow the format below.
See Table 4 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 4 - Parameter Information for Work Centre - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type | |
Create | Update | |||||
ID | Workcentre.id | NUMBER | N/A | No5 | N/A | Exact |
WorkCentreGroup | Workcentregroup.name | VARCHAR2(500 BYTE) | Yes | No | No | Exact |
assetType | Assettype.name | VARCHAR2(30 BYTE) | Yes | No | No | Exact |
area | Area.name | VARCHAR2(100 BYTE) | Yes | No | No | Exact |
suid | Workcentre.suid | VARCHAR2(200 BYTE) | No | No | N/A | N/A |
name | Workcentre.name | VARCHAR2(500 BYTE) | Yes | No | N/A | N/A |
description | Workcentre.description | VARCHAR2(2000 BYTE) | No | No | N/A | N/A |
costPerHour | Workcentre.defaultcostperhour | NUMBER(10,2) | No | No | N/A | N/A |
labourCostPerHour | Workcentre.labourcostperhour | NUMBER(10,2) | No | No | N/A | N/A |
workPattern | Workpattern.name | VARCHAR2(30 BYTE) | Yes | No | No | Exact |
capacity | Schedulingresource.capacity | NUMBER | Yes | No | N/A | N/A |
plannedEfficiency | workcentre.plannedefficiency | NUMBER(10,2) | Yes | No | N/A | N/A |
shiftConstraint | Shiftconstrainttype.name | VARCHAR2(30 BYTE) | Yes | No | No | Exact |
createDevice | N/A | BOOL | Yes | No | N/A | N/A |
allowConcurrentWork | Workcentre.allowconcurrentwork | BOOL | Yes | No | N/A | N/A |
canRunUnattended | Workcentre.canrununattended | BOOL | Yes | No | N/A | N/A |
assetTracking | Workcentre.trackassetstatus | BOOL | Yes | No | N/A | N/A |
isActive | Workcentre.isactive | BOOL | Yes | No | N/A | N/A |
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
Response
When using the Work Centre – Upsert API call, if a Work Centre 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 Work Centre – Delete API call attempts to delete a Work Centre. A Work Centre can only be deleted if it has not been used in Eyelit MES-M.
Figure 3 shows the logic used within the Work Centre – Delete API call.
Figure 3 - Logic within Work Centre/Delete API Call
Prerequisites
In order to delete a Work Centre, the Work Centre must exist in Eyelit MES-M. The Work Centre have not been used and not be referenced against any other entities.
Request
Table 5 shows the method and endpoint required to make the API call to list Work Centre Groups.
Table 5 - Outbound Message Detail for Work Centre - Delete
Method | URL Structure | Endpoint |
DELETE | https://[environment].mestec.net | /api/Work Centre/Delete |
The body of the payload should follow the format below.
See Table 6 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 6 - Parameter Information for Work Centre - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | WorkCentre.id | NUMBER | Yes | N/A | 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.
Delete by ID
Response
When using the Work Centre – Delete API call, if a Work Centre has been deleted a 200 response will be returned.
SetPrimaryWorkCentreGroup
The Work Centre – SetPrimaryWorkCentreGroup API call attempts to assign the given Work Centre Group as primary for this Work Centre
Figure 4 shows the logic used within the Work Centre– SetPrimaryWorkCentreGroup API call.
Figure 4 - Logic within Work Centre - SetPrimaryWorkCentreGroup API Call
Prerequisites
When assigning a Work CentreGroup as primary workcentre to a Work Centre, both the Work Centre and Work Centre Group must exist in Eyelit MES-M.
Request
Table 7 shows the method and endpoint required to make the API call to SetPrimaryWorkCentreGroup.
Table 7 - Outbound Message Detail for Work Centre - SetPrimaryWorkCentreGroup
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/WorkCentre/ SetPrimaryWorkCentreGroup |
The body of the payload should follow the format below.
See Table 8 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M.
Table 8 - Parameter Information for Work Centre - SetPrimaryWorkCentreGroup
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
id | WorkCentre.id | NUMBER | Yes | No | Exact |
WorkCentresGroup | WorkCentregroup.name | VARCHAR2(500 BYTE) | Yes | 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.
Response
When using the Work Centre– SetPrimaryWorkCentreGroup API call, if a Work Centre Group has been set as primary work centre to Work Centre , 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.