Updating Secondary Co-produce Links
The Secondary Co-produce link exists between specific version of Co-produce object and the main part of Secondary Part. You can update single or multiple Secondary Co-produce links for a Co-produce or its subtype object in context of Change (Change Task or Change Notice). You must first reserve the Change object for Edit. You can update single or multiple Secondary Co-produce links for a Co-produce object by specifying the link OIDs and their attributes in the request body. You can update both modeled and all other types of attributes associated with the link object.
* 
You must provide the Made From Set OID to update the Made From Set reference on the Secondary Co-produce Links.
The Made From Set OID must belong to the Secondary Part for which you want to update the Secondary Co-produce Link.
Example: Updating Multiple Secondary Co-produce Links for a Part Object in Context of Change with Inline Navigation Criteria
This example shows you how to update two Secondary Co-produce links objects for a Part object with inline Navigation Criteria in context of Change specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:200802')/PTC.BomTransformation.UpdateSecondaryCoproduceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SecondaryCoproduceLinks": [
{
"ID": "OR:wt.mpm.coproduce.SecondaryCoproduceLink:205707",
"LineNumber": 10,
"CustomAttribute1": 8,
"TestAttribute": "Test1",
"Quantity": 2,
"Unit": {
"Value": "ea",
"Display": "each"
},
"AlternateSetMaster@odata.bind": "Parts('OR:wt.part.WTPart:205405')",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeActivity2:206572')"
]
},
{
"ID": "OR:wt.mpm.coproduce.SecondaryCoproduceLink:205709",
"LineNumber": 11,
"Quantity": 1,
"Unit": {
"Value": "ea",
"Display": "each"
},
"AlternateSetMaster@odata.bind": "Parts('OR:wt.part.WTPart:205405')",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeActivity2:206572')"
]
}
],
"NavigationCriteria": {
"ApplicableType": "PTC.ProdMgmt.Part",
"ApplicationName": null,
"ApplyToTopLevelObject": false,
"Centricity": false,
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartEffectivityDateConfigSpec",
"EffectiveDate": "2022-03-15T23:00:00Z",
"EffectiveContext": "wt.part.WTPartMaster:194861",
"View": "Design",
"Variation1": null,
"Variation2": null
}
],
"CreatedOn": "2022-03-22T00:25:50+01:00",
"Filters": [],
"HideUnresolvedDependents": false,
"LastModified": "2022-03-22T00:25:50+01:00",
"Name": "filter1",
"SharedToAll": false,
"UseDefaultForUnresolved": false
}
}
Example: Updating Multiple Secondary Co-produce Links for a Part Object in Context of Change for a Specific Navigation Criteria
This example shows you how to update two Secondary Co-produce links for a Part object for a specific Navigation Criteria and in context of Change specified in the request body. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:200802')/PTC.BomTransformation.UpdateSecondaryCoproduceLinks
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"SecondaryCoproduceLinks": [
{
"ID": "OR:wt.mpm.coproduce.SecondaryCoproduceLink:205707",
"Quantity": 2,
"Unit": {
"Value": "ea",
"Display": "each"
},
"AlternateSetMaster@odata.bind": "Parts('OR:wt.part.WTPart:205405')",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeActivity2:206572')"
]
},
{
"ID": "OR:wt.mpm.coproduce.SecondaryCoproduceLink:205709",
"Quantity": 1,
"Unit": {
"Value": "ea",
"Display": "each"
},
"AlternateSetMaster@odata.bind": "Parts('OR:wt.part.WTPart:205405')",
"ResultedByObjects@odata.bind": [
"ChangeItems('VR:wt.change2.WTChangeActivity2:206572')"
]
}
],
"navigationCriteriaId": "OR:wt.filter.NavigationCriteria:331152"
}
* 
The applied Navigation Criteria is used for resolving the Primary Part and Secondary Part structures to generate the Co-produce object structure.
URI with Expand
POST /Windchill/servlet/odata/BomTransformation/Coproduces('OR:wt.part.WTPart:200802')/PTC.BomTransformation.UpdateSecondaryCoproduceLinks?$expand=Secondary,AlternateSetMaster