Modifying product bill of materials
Modifying Bill of Materials (BoM)
To modify a Bill of Materials (BoM), use the Product endpoint. The request will look like this (replace dev with your account):
cURL Request
curl --request POST \
--url https://app.finaleinventory.com/dev/api/product/100000 \
--header 'authorization: Basic XXX' \
--data '{"productAssocList":[{"productAssocTypeId":"MANUF_COMPONENT","productAssocUrl":"/dev/api/productassoc/100000","productAssocItemList":[{"productUrl":"/dev/api/product/100001","quantity":8}]}],"productId":"100000","productUrl":"/dev/api/product/100000"}'
Breaking Out the Data Sent for the Request
{
"productAssocList": [
{ "productAssocTypeId": "MANUF_COMPONENT",
"productAssocUrl": "/dev/api/productassoc/100000",
"productAssocItemList": [
{ "productUrl": "/dev/api/product/100001", "quantity": 8 }
]
}
],
"productId": "100000",
"productUrl": "/dev/api/product/100000"
}
Important Notes
- The
productAssocUrlfor the specificproductAssocListmust be correct. When creating a newproductAssocListfrom an empty product, you can exclude theproductAssocUrl. In all other cases, specify it. - If you don’t specify a
productAssocUrlwhen updating theproductAssocList, it will create a new entry instead of replacing the existing one. This extra entry will not be picked up by builds in the UI or imports. - The UI and Imports only pull the first
productAssocListentry. All other entries will be ignored.
Required Values
- productAssocList: List of product BoMs. Our UI/Imports only support a single BoM, even though our API can handle multiple.
- productAssocUrl: Unique identifier for the
productAssocListentry. Required for all update operations. - productAssocTypeId: Always "MANUF_COMPONENT" for BoMs.
- productAssocItemList: Associated item list for the BoM. Each entry must have a
productUrland a quantity. - productId, productUrl: Both are required for any updates to the product API.
Additional Note
Product URLs must be obtained from the product collection, as a different internal identifier is used than the visible product ID.