2

We are developing an internal project to use the Windchill OData REST API to fill the eBOM for a given part. What we are trying to do here is to read data from another software we have to get the BOM info and send it to the part in windchill. But we cannot find an endpoint in servlet/odata to do it.

We guess the idea is to replicate the manual process. So we already know how to create, check out and check in a part. However we still cannot find an endpoint to modify the part and add the eBOM.

We know PartList, PartListItem, GetPartStructure in the PTC Product Management Domain. But these are GET endpoints and are only useful to retrieve data, including the BOM. But we cannot use them to modify the content.

A887795
  • 33
  • 4
  • As sukriti gupta mentioned could you please share any reference or how you are doing it for the get part and are you able to export it in an excel format via Rest-API? – flyaround Sep 01 '22 at 11:18
  • 1
    @flyaround you need to handle the excel export by yourself after getting the data. For more information about the endpoints I mentioned in my question, you can look for them in the REST API manual. [This link](https://support.ptc.com/help/windchill_rest_services/r2.2/en/#page/windchill_rest_services/wccg_restaccessexamples_prodmgmt_action_getpartslist.html) might help you. – A887795 Sep 05 '22 at 20:54

1 Answers1

0

I've found the solution.

The endpoint to use is: POST /ProdMgmt/Parts('VR:wt.part.WTPart:xxxxxxxxx')/Uses

The body of the request must contain:

{
    "Quantity": 1,
    "Unit": {
        "Value": "ea",
        "Display": "Each"
    },
    "TraceCode": {
        "Value": "0",
        "Display": "Untraced"
    },
    "Uses@odata.bind": "Parts('OR:wt.part.WTPart:yyyyyyyyy')"
}

Where Uses@odata.bind contains the ID of the part we want to link

A887795
  • 33
  • 4