Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to add BOM to item using REST API

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
chocolate_ali
636 Views, 2 Replies

Trying to add BOM to item using REST API

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?

2 REPLIES 2
Message 2 of 3
dahalb
in reply to: chocolate_ali

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

Message 3 of 3
chocolate_ali
in reply to: dahalb

Thanks that works perfectly!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report