Versions
Versions this documentation is relevant for:
- 8.7.0+
A BoM Version in Eyelit MES-M is the definition BoM that is referenced by a scheduled job via a recipe. It contains the BoM slots which need to be satisfied in order to produce the product.
List
The Bom Version – List API call reads existing BoM Versions 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 BoM Versions.
Using the Bom Version – List API call has no impact on the data within the given Eyelit MES-M application, it is read-only.
Figure 1 - Logic within Bom Version/List API Call
Data Prerequisites
There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list BoM Versions. 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 Scheduled Jobs.
Table 1 - Outbound Message Detail for BoM Version - List
Method | URL Structure | Endpoint |
POST | https://[environment].mestec.net | /api/BomVersion/List |
The body of the payload should follow the format below.
JSON Structure for BoM Version List
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 BomVersion - List
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
id | Bomversion.id | NUMBER | No | N/A | Exact |
bom | Bom.name | VARCHAR2(100 BYTE) | No | No | Exact |
scheduleID | Bomversion.scheduleid | NUMBER | No | N/A | Exact |
majorVersion | Bomversion.majorversion | NUMBER | No | No | Exact |
minorVersion | Bomversion.minorversion | NUMBER | No | No | Exact |
approvalStatus | Approvalstatus.name | VARCHAR2(50 BYTE) | No | No | Exact |
suid | Bomversion.suid | VARCHAR2(120 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 BoM Versions where the name is ‘ABC’:
JSON Sample for BoM Version List Request B
Response
When using the Bom Version – 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:
JSON Structure for BoM Version List
Sample Response
See below for sample use cases with examples of the JSON payload format returned.
No results were found that matched given parameters:
JSON Sample for BoM Version List Response A
BoM Versions found that matched given parameters:
JSON Sample for BoM Version List Response B
Upsert
When BoM Version ID is provided, he BoM Version – Upsert API call checks if a BoM Version with the given ID already exists. If it does, appropriate fields are updated in the matching BoM Version in Eyelit MES-M.
When the BoM Version ID is omitted, a new BoM Version will be created.
Figure 2 - Logic within Bom Version/Upsert API Call
Data Prerequisites
A BoM Version references a BoM , these must all exist in Eyelit MES-M prior to BoM Version upsert.
Request
Table 3 shows the method and endpoint required to make the API call to Upsert BoM Version.
Table 3 - Outbound Message Detail for Bom Version - Upsert
Method | URL Structure | Endpoint |
PUT | https://[environment].mestec.net | /api/Bom Version/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 BoM Version - Upsert
Parameter Name | Data Mapping | Data Type | Mandatory |
| Case Sensitive | Match Type |
|
|
| Create | Update |
|
|
id | Bomversion.id | NUMBER | N/A | Yes | N/A | Exact |
bom | Bom.name | VARCHAR2(100 BYTE) | Yes | No | No | Exact |
version | Bom.majorversion/minorversion | N/A | Yes | No | N/A | N/A |
approvalStatus | Approvalstatus.name | VARCHAR2(50 BYTE) | Yes | No | No | Exact |
changeReference | Bomversion.changeref | VARHCAR2(100 BYTE) | No | No | No | N/A |
suid | Bomversion.suid | VARCHAR2(120 BYTE) | No | 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 create a BoM Version.
To update description by ID.
Response
When using the BoM Version – Upsert API call, if a BoM Version 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 BoM Version – Delete API call attempts to delete a BoM Version. A BoM Version can be deleted as long as it has not been used.
Figure 3 shows the logic used within the BoM Version – Delete API call.
Figure 3 - Logic within BoM Version/Delete API Call
Data Prerequisites
In order to delete a BoM Version it must exist in MESTEC and not currently be in use.
Request
Table 5 shows the method and endpoint required to make the API call to delete a BoM Version.
Table 5 - Outbound Message Detail for BoM Version - Delete
Method | URL Structure | Endpoint |
DELETE | https://[environment].mestec.net | /api/Bom Version/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 MESTEC.
Table 6 - Parameter Information for BoM Version - Delete
Parameter Name | Data Mapping | Data Type | Mandatory | Case Sensitive | Match Type |
ID | Bom Version.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 BoM Version – Delete API call, if a Scheduled Job has been Deleted a 200 status response will be returned.