Retrieving Replacement Parts in the Bill of Material (BOM)
Example: Fetching Alternates in the Bill of Material (BOM)
This example shows you how to fetch alternates in the bill of material (BOM) for a product structure.
Use the following POST URI with the request body to retrieve the BOM with expand on alternates.
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:254405')/PTC.ProdMgmt.GetPartStructure?$expand=Components($expand=Alternates) HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:1005970"
}
}
Example: Fetching Alternates in the Bill of Material (BOM) with Additional Details
Use the following POST URI with the request body to retrieve the BOM with expand on alternates with additional details.
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:254405')/PTC.ProdMgmt.GetPartStructure?$expand=Components($expand=Alternates($expand=Alternate($select=Name),AlternatePart($select=Identity),AlternateFor($select=Name))) HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:1005970"
}
}
Example: Fetching Substitutes in the Bill of Material (BOM) along with Path Details
This example shows you how to fetch substitutes in the bill of material (BOM) for a product structure. Use the following POST URI with the request body to retrieve the BOM with expand on substitutes:
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:254405')/PTC.ProdMgmt.GetPartStructure?$expand=Components($expand=Substitutes) HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:1005970"
}
}
Example: Fetching Substitutes in the Bill of Material (BOM) along with additional details
Use the following POST URI with the request body to retrieve the BOM with expand on substitutes with additional details.:
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:254405')/PTC.ProdMgmt.GetPartStructure?$expand=Components($expand=Substitutes($expand=Substitute($select=Name),SubstitutePart($select=Identity),SubstituteFor($expand=UsedBy($select=Identity)))) HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"NavigationCriteria": {
"ID": "OR:wt.filter.NavigationCriteria:1005970"
}
}