BoM


Versions

Versions this documentation is relevant for:

  • 8.7.0+

BoM is the header table in Eyelit MES-M for BoM Versions. It is used to link the BoM Versions to a product and a BoM Type. 

List

The Bom – List API call reads existing BoMs 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 BoMs 

Using the Bom – 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/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 BoMs. 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 - List 

Method 

URL Structure 

Endpoint 

POST 

https://[environment].mestec.net 

/api/Bom/List 


The body of the payload should follow the format below.  

JSON Structure for BoM List 

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

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

Id 

Bom.id 

NUMBER(10,0) 

No 

N/A 

Exact 

product 

Product.name 

VARCHAR2(50 BYTE) 

No 

No 

Exact 

bomType 

Bomtype.name 

VARCHAR2(50 BYTE) 

No 

No 

Exact 

name 

Bom.name 

VARCHAR2(100 BYTE) 

No 

No 

Exact 

suid 

Bom.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. See examples in Section 4.1.3.1 for use cases.  

Sample Request 

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

To list BoMs where the name equals ‘ABC: 

JSON Sample for BoM List Request B 

ActiveX control

Response 

When using the Bom – 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 List 

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: 

JSON Sample for BoM List Response A 

ActiveX control 

BoMs found that matched given parameters: 

JSON Sample for BoM List Response B 

ActiveX control 

Upsert

When BoM ID is provided, The Bom – Upsert API call checks if a BoM with the given ID already exists. If it does, appropriate fields are updated in the matching BoM in Eyelit MES-M. 

When the BoM ID is omitted, a new BoM will be created. 

Figure 2 - Logic within Bom/Upsert API Call 

ActiveX control 

Data Prerequisites 

BoM references a product, and a BoM Type, these must all exist in Eyelit MES-M prior to BoM upsert. 

Request 

Table 3 shows the method and endpoint required to make the API call to Upsert BoM. 

Table 3 - Outbound Message Detail for BoM Upsert 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/Bom/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 BoM Upsert 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

 

Case Sensitive 

Match Type 

 

 

 

Create 

Update 

 

 

id 

Bom.id 

NUMBER(10,0) 

N/A 

Yes 

N/A 

Exact 

product 

Product.name 

VARCHAR2(50 BYTE) 

Yes 

No 

No 

Exact 

bomType 

Bomtype.name 

VARCHAR2(50 BYTE) 

Yes 

No 

No 

Exact 

name 

Bom.name 

VARCHAR2(100 BYTE) 

Yes 

No 

N/A 

N/A 

suid 

Bom.suid 

VARCHAR2(120 BYTE) 

No 

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

ActiveX control 

To update name by ID. 

ActiveX control 

Response 

When using the Bom – Upsert API call, if a BoM 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 Bom – Delete API call attempts to delete a BoM. A BoM can be deleted as long as it has not been used. 

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

Figure 3 - Logic within Bom/Delete API Call 

ActiveX control 

Data Prerequisites 

In order to delete a BoM it must exist in Eyelit MES-M and not currently be in use. 

Request 

Table 5 shows the method and endpoint required to make the API call to delete a BoM. 

Table 5 - Outbound Message Detail for BoM - Delete 

Method 

URL Structure 

Endpoint 

DELETE 

https://[environment].mestec.net 

/api/Bom/Delete 

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

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

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

ActiveX control 

Response 

When using the Bom – Delete API call, if a BoM  has been Deleted a 200 status response will be returned.