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 Product/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 Products. 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 - List
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/Product/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 Product - List
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | product.id | NUMBER | No | N/A | Exact |
Name | product.name | VARCHAR2(250 BYTE) | No | No | Exact |
SUID | product.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 Products:
To list Product where the name is ‘Controlled’:
Response
When using the Product – 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:
Product found that matched given parameters:
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 the ID value is omitted, a new Product will be created.
Figure 14 shows the logic used within the Product Group – Upsert API call. Figure 15 and Figure 16 show the logic internal to the Create and Update Product sub process.
Figure 2 - Logic within Product/Upsert API Call
Figure 3 - Logic within Product/Upsert API Call Internal Transaction - Create Product
Figure 4 - Logic within Product/Upsert API Call Internal Transaction - Update Product
Prerequisites
When creating or updating a product, the following entities must already exist in Eyelit MES-M in order to be referenced.
Product 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 Product Groups.
Table 3 - Outbound Message Detail for Product Group - Upsert
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/Product/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 Product Group - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type | |
Create | Update | |||||
ID | product.id | NUMBER | N/A | No3 | N/A | Exact |
Product Type | producttype.name | VARCHAR2(250 BYTE) | Yes | N/A4 | No | Like |
SUID | product.suid | VARCHAR2(200 BYTE) | No | No | N/A | N/A |
Name | product.name | VARCHAR2(250 BYTE) | Yes | No | N/A | N/A |
Description | Product.description | VARCHAR2(2000 BYTE) | No | No | N/A | N/A |
Version | Product.version | VARCHAR2(50) | Yes | No | N/A | N/A |
Default Ownership | Ownershiptype.name | VARCHAR2(50 BYTE) | Yes | No | No | Exact |
Default Cost Per Unit | Product.defaultcostperunit | NUMBER | Yes | No | N/A | N/A |
Default Currency | Currency.currencyname | VARCHAR2(50) | Yes | No | No | Exact |
Base Unit | Unitofmeasure.unitname | VARCHAR2(30) | Yes | No | No | Exact |
Receipt Profile | Receiptprofile.profilename | VARCHAR2(100) | No | No | No | Exact |
Receipt Recipe | Recipe.name | VARCHAR2(200) | No | No | No | Exact |
Serial Range | Serialrange.name | VARCHAR2(500) | No | No | No | Exact |
Default Batch Size | Product.defaultbatchsize | NUMBER | Yes | No | N/A | N/A |
Min Schedule Batch Size | Product.minschedulebatchsize | NUMBER | No | No | N/A | N/A |
Schedule Batch Increment | Product.schedulebatchincrement | NUMBER | No | No | N/A | N/A |
Max Schedule Batch Size | Product.maxschedulebatchsize | NUMBER | No | No | N/A | N/A |
Pegging Expiry Days | Product.peggingexpirydays | NUMBER | No | No | N/A | N/A |
Shelf Life Days | Product.shelflifedays | NUMBER | No | No | N/A | N/A |
Inventory Decimal Places | Product.inventorydecimalplaces | NUMBER | Yes | No | N/A | N/A |
Location | Location.name | VARCHAR2(20) | Yes | No | No | Exact |
Is Active | Product.isactive | Bool | Yes | No | N/A | N/A |
Is Planning Constraint | Product.isplanningconstraint | Bool | Yes | No | N/A | N/A |
Properties: Name | Tablepropertydefinition.propertyname | VARCHAR2(50) | No | No | No | Exact |
Properties: Value | Productprop.value | VARCHAR2(500) | No | No | N/A | N/A |
Source Product Name | Product.name | VARCHAR2(250 BYTE) | No | N/A | 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
Response
When using the Product – Upsert API call, if a Product 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 Product – Delete API call attempts to delete a Product. A Product can only be deleted if it has not been used in Eyelit MES-M.
Figure 5 shows the logic used within the Product – Delete API call.
Figure 5 - Logic within Product/Delete API Call
Prerequisites
In order to delete a Product, the Product must exist in Eyelit MES-M.
The Product have not been used and not be referenced against any other entities.
Request
Table 6 shows the method and endpoint required to make the API call to list Product Groups.
Table 6 - 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.
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 Product Group - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | product.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
Response
When using the Product – Delete API call, if a Product 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.