Product Group


List  

The Product Group – List API call reads existing Product Groups 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 Product Groups 

Using the Product Group – 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 Product Group – List API call. 

Figure 1 Logic within ProductGroup/List API Call 

ActiveX control 

Data Prerequisites 

There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list Product Groups. 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 Product Groups. 

Table 1 - Outbound Message Detail for Product Group - List 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/ProductGroup/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 Product Group - List 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

productgroup.id 

NUMBER 

No 

N/A 

Exact 

Name 

productgroup.name 

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 Product Groups: 

ActiveX control 

To list Product Groups where the name is Controlled: 

ActiveX control

Response 

When using the Product Group – 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 

Multiple Product Groups were found that matched given parameters: 

ActiveX control

Upsert  

The Product Group – Upsert API call checks if a Product Type with the given ID already exists. If it does, appropriate fields are updated in the matching product in Eyelit MES-M. 

If no ID is provided, then a new Product Group is created. 

Figure 2 shows the logic used within the Product Group – Upsert API call. 

Figure 2 - Logic within ProductGroup/Upsert API Call 

ActiveX control 

Data Prerequisites 

There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to upsert Product Groups. If parameters are passed in through the body that return no valid results a new product group will be created, otherwise the Product Group identified will be updated. 

Request 

Table 3 shows the method and endpoint required to make the API call to list Product Groups. 

Table 3 - Outbound Message Detail for Product Group - Upsert 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/ProductGroup/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 Product Group - Upsert 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

productgroup.id 

NUMBER 

No2 

N/A 

Exact 

Name 

productgroup.name 

VARCHAR2(250 BYTE) 

No 

N/A 

N/A 

Description 

productgroup.description 

VARCHAR2(2000 BYTE) 

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 

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

To create a new Product Group. 

ActiveX control 

To update name and description by ID. 

ActiveX control

Response 

When using the Product Group – Upsert API call, if a Product Group 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 controlDelete  

The Product Group – Delete API call attempts to delete a Product Group. A Product Group can be deleted as long as there are no Products currently assigned to the Product Group. 

Figure 3 shows the logic used within the Product Group – Delete API call. 

Figure 3 - Logic within ProductGroup/Delete API Call 

ActiveX control 

Data Prerequisites 

In order to delete a Product Group, the Product Group must exist in Eyelit MES-M. 
The Product Group must have no Products currently assigned. 

Request 

Table 5 shows the method and endpoint required to make the API call to list Product Groups. 

Table 5 - Outbound Message Detail for Product Group - Delete 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/ProductGroup/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 Product Group - Delete 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

productgroup.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

Response 

When using the Product Group – Delete API call, if a Product Group has been Deleted 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