Copying and Pasting Using Paste Special
You can copy an upstream part and paste it as a new part to the specified downstream part based on the configuration you specify in the automatic BOM transformation template in Windchill. You can copy and paste using PasteSpecial by specifying the source root part, source part or path of the source part, target root part, and target part or path of the target part in the request body.
You can add a single or multiple copied parts to the downstream structure by specifying inline or specific upstream and downstream navigation criteria in the request body. If you do not specify the navigation criteria, the System Default filter is applied.
You can also copy and paste using PasteSpecial in the context of change (change task or change notice).
* 
You can use the following API to fetch additional information of a part in the BOM structure required for this request:
POST /Windchill/servlet/odata/BomTransformation/XBOMParts('<RootPartOID>')/PTC.BomTransformation.GetManufacturingBOM?$expand=Components($levels=max)
Example: Copying a Part from the Upstream Structure and Pasting It Using Paste Special to the Specified Downstream Part
This example shows you how to copy an upstream part and paste it to the specified downstream part based on the default configuration specified in the automatic BOM transformation template. This example shows you how to copy and paste using specific upstream and downstream navigation criteria. In this example, the source root part is the root part of the upstream structure, and the target root part is the root part of the downstream structure. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteSpecial
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DiscrepancyContext": {
"SourceRoot@odata.bind": "Parts('OR:wt.part.WTPart:189974')",
"TargetRoot@odata.bind": "Parts('OR:wt.part.WTPart:190583')",
"SourcePartSelection": [
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189986')"
}
],
"TargetPart@odata.bind": "Parts('OR:wt.part.WTPart:190583')",
"UpstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:190545')",
"DownstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:190552')"
}
}
The request adds the specified upstream part under the specified downstream part, as is. The request creates new equivalence links between the downstream BOM and the upstream BOM. The request also returns usage links for the downstream parts.
Example: Copying Multiple Parts with One of Those Having an Existing Equivalent Link from the Upstream Structure and Pasting Them Using Paste Special to the Specified Downstream Part
This example shows you how to add two of the three copied upstream parts as a new part each to the specified downstream part. The third part is configured to be skipped in the automatic BOM transformation template. In this example, the first upstream part has an existing downstream equivalent link. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteSpecial
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DiscrepancyContext": {
"SourceRoot@odata.bind": "Parts('OR:wt.part.WTPart:189974')",
"TargetRoot@odata.bind": "Parts('OR:wt.part.WTPart:190583')",
"SourcePartSelection": [
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189986')"
},
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189985')"
},
{
"Part@odata.bind": "Parts('OR:wt.part.WTPart:189586')"
}
],
"TargetPart@odata.bind": "Parts('OR:wt.part.WTPart:190583')",
"UpstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:190545')",
"DownstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:190552')"
}
}
The request adds only the first two parts to the downstream structure and skips the third part as per the configuration. The request adds the two upstream parts as a new part each under the specified downstream part.
The request returns the existing equivalence link for the first part and creates a new equivalence link for the second part. The request also returns the usage links for both the new downstream parts.
Example: Copying a Part from the Upstream Structure and Pasting It Using Paste Special to the Specified Downstream Part in the Context of Change
This example shows you how to copy an upstream part and paste it as is to the specified downstream part based on the default configuration specified in the automatic BOM transformation template, in the context of change. Use the following POST URI with the request body:
URI
POST Windchill/servlet/odata/BomTransformation/PasteSpecial
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"DiscrepancyContext": {
"SourceRoot@odata.bind": "Parts('OR:wt.part.WTPart:209260')",
"TargetRoot@odata.bind": "Parts('OR:wt.part.WTPart:207248')",
"SourcePartSelection": [
{
"Path": "20857b46-4e0c-4e54-974f-93043a800cf0"
}
],
"TargetPath": "e7705b71-b055-432c-b495-f884095fe112",
"UpstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:206717')",
"DownstreamNavigationCriteria@odata.bind": "NavigationCriterias('OR:wt.filter.NavigationCriteria:206721')"
},
"ChangeOid": "VR:wt.change2.WTChangeOrder2:441860"
}
The request adds the specified upstream part under the specified downstream part, as is. The request adds the modified downstream part to the Resulting Objects table of the change object specified in the ChangeOid attribute.
To see more details, expand the upstream parts, downstream parts, equivalent links, and usage links.
URI with Expand
POST Windchill/servlet/odata/BomTransformation/PasteSpecial?$expand=UpstreamPart($select=ID,Identity),DownstreamPart($select=ID,Identity),EquivalenceLink($select=ID,Annotations,DownstreamContext,UpstreamContext),UsageLink($select=ID;$expand=Uses($select=ID,Identity),UsedBy($select=ID,Identity))