Versions
Versions this documentation is relevant for:
- 8.7.0+
List
The Product– List API call reads existing Product 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– 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– 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 |
POST | 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 - List3
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 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– Upsert API call checks if a Product 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 2 shows the logic used within the Product– 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 Product-Upsert.
Table 3 - Outbound Message Detail for Product- 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 - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type | |
Create | Update | |||||
ID | product.id | NUMBER | N/A | Yes4 | N/A | Exact |
Product Type | producttype.name | VARCHAR2(250 BYTE) | Yes | N/A5 | 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) | Yes | 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 5 shows the method and endpoint required to make the API call to delete product.
Table 5 - Outbound Message Detail for Product - Delete
Method | URL Structure | Endpoint |
DELETE | https://[environment].mestec.net | /api/Product/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 Product - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | product.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 Product – Delete API call, if a Product has been deleted a 200 status response will be returned.
Copy
The Product– Copy API call attempts to copy a Product from source product. A Product can only be copied if source product available in Eyelit MES-M.
Figure 6 shows the logic used within the Product– copy API call.
Figure 6 - Logic within Product/Copy API Call
Prerequisites
When copying a Product from source product, source product must exist in Eyelit MES-M.
Request
Table 7 shows the method and endpoint required to make the API call to copy product.
Table 7 - Outbound Message Detail for Product - Copy
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/Product/Copy |
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 Product - Copy
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
suid | product.suid | VARCHAR2(200 BYTE) | Yes | N/A |
|
name | product.name | VARCHAR2(50 BYTE) | Yes |
|
|
description | product.description | VARCHAR2(200 BYTE) | No |
|
|
srcProductName | product.name | VARCHAR2(50 BYTE) | Yes | N/A | Exact |
Sample Request
See below for sample use cases with examples of the JSON payload format required.
Response
When using the Product -Copy API call, if a Product has been copied from source product, 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.