Create a Bill of Material
If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can create bills of material (BOMs). For details about the management of bills of material, see Managing Bills of Material.
Testing of the Request
Before you test the code in the following section, you need to:
- Deploy a new MYOB Acumatica instance with the SalesDemo dataset. For details on deploying an instance, see To Deploy an MYOB Acumatica Instance.
- On the Enable/Disable Features (CS100000) form, make sure the Manufacturing feature is enabled.
- If you use Postman as the client application for testing, in the IntegrationDevelopmentGuide.postman_collection.json collection (which is located in the IntegrationDevelopment\Help folder of the Help-and-Training-Examples repository on GitHub), make sure the collection variables have the proper values.
- To sign in to the instance in the client application, use the tenant name (which you specified when you created the instance) and the PRODWHOLE branch.
Requests
<MYOB Acumatica instance URL>
is the URL of the MYOB Acumatica
instance (such as https://my.acumatica.com/MyInstance
). You can omit
the instance name in the URL (such as https://my.acumatica.com
) if the
instance is installed in the root of the website.You can use the following HTTP request example to create a BOM containing information about an operation and a material used.
PUT ?$expand=Operations,Operations/Material HTTP/1.1
Host: [<MYOB Acumatica instance URL>]/entity/MANUFACTURING/23.200.001/BillOfMaterial
Accept: application/json
Content-Type: application/json
{
"BOMID": {
"value": "<NEW>"
},
"Description": {
"value": "Test BOM"
},
"InventoryID": {
"value": "CABINET"
},
"Operations": [
{
"OperationNbr": {
"value": "0010"
},
"WorkCenter": {
"value": "WC10"
},
"Material" :[
{
"InventoryID": {
"value": "HINGE"
},
"UOM":{
"value": "EA"
}
}
]
}
],
"Revision": {
"value": "A"
}
}
In this example, the <NEW> value is specified for the BOMID
field, and the next identifier is assigned to this field for the newly created BOM.
You can also specify an empty string as a value for the BOMID
field, which will lead to the same result.
{
"BOMID": { "value": "" },
...
}