I am trying to add a BOM to an item in PLM 360 through the REST API. I can successfully add an item in and read a BOM, but when I try to add the BOM I get "Internal Server error 500" returned. I am querying the /api/rest/v1/workspaces/{workspaceID}/items/{DMSID}/boms endpoint. The BOM i'm sending is below:
"{"list":{"data":[{"bom_item":{"dmsID":5827,"workspaceType":1,"workspaceID":113,"bomDepthLevel":1,"quantity":1.0,"formattedQuantity":"1","descriptor":null,"revision":null,"itemNumber":0,"assembly":false,"cost":0.0,"isPinned":false,"quoteID":0,"isUsingDefaultQuote":false,"leaf":false,"redlinedCost":0.0,"redlineAddition":false,"redlineAgainstVersion":0,"redlineDeletion":false,"totalWeight":0.0,"lifecycleStatus":null,"hasSourcing":false,"hasRedlinedSourcing":false,"fields":null}},{"bom_item":{"dmsID":5832,"workspaceType":1,"workspaceID":113,"bomDepthLevel":1,"quantity":1.0,"formattedQuantity":"1","descriptor":null,"revision":null,"itemNumber":0,"assembly":false,"cost":0.0,"isPinned":false,"quoteID":0,"isUsingDefaultQuote":false,"leaf":false,"redlinedCost":0.0,"redlineAddition":false,"redlineAgainstVersion":0,"redlineDeletion":false,"totalWeight":0.0,"lifecycleStatus":null,"hasSourcing":false,"hasRedlinedSourcing":false,"fields":null}}]}}"
Has anyone succuessfully added a BOM to an item in PLM?
Solved! Go to Solution.
Solved by dahalb. Go to Solution.
Hi,
The BOM endpoint is limited doesn't accept all the columns of a bom table.
It also accepts collection of bom objects that have three fields: bomDmsID, itemNumber and itemQuantity.
Here is a an example of a payload:
[ { "bomDmsID":123, "itemNumber":100, "itemQuantity": 2},
{ "bomDmsID":456, "itemNumber":200, "itemQuantity": 3},
{ "bomDmsID":789, "itemNumber":300, "itemQuantity": 2} ]
Note that it doesn't recognize other fields such as: bomDepthLevel, redline*, has*..etc other than the three mentioned above