Work Centre


List 

The Work Centre – List API call reads existing Work Centrefrom 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 Centr– List API call. 

Figure 1 - Logic within Work Centre/List API Call 

ActiveX control 

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 - List 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/WorkCentre/List 

The body of the payload should follow the format below.  

ActiveX control 

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 

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 Work Centres: 

ActiveX control 

To list Work Centre where the name is Controlled: 

ActiveX control 

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: 

ActiveX control 

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

No results were found that matched given parameters: 

ActiveX control 

Work Centre found that matched given parameters: 

ActiveX control 

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-MIf 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 

ActiveX control 

Pre-requisites 

When creating or updating 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.  

ActiveX control 

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 

No2 

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 

ActiveX control 

Response 

When using the Work Centre – Upsert API call, if Work Centre has been created or updated, a JSON payload will be returned containing data in the following structure: 

ActiveX control

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

ActiveX control

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 

ActiveX control 

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 Group - Delete 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/Work CentreGroup/List 

The body of the payload should follow the format below.  

ActiveX control 

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 Group - Delete 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

WorkCentre.id 

NUMBER 

No 

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 

ActiveX control