Windchill REST Services > Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC Product Management Domain > Retrieving Replacement Parts
  
Retrieving Replacement Parts
Example: Retrieving Alternates of a Part
This example shows you how to retrieve alternates of a part. Use the following GET request:
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:107801’)?$expand=Alternates HTTP/1.1
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:107801’)/Alternates HTTP/1.1
Example: Retrieving Alternates with more details (Alternate, AlternateFor and AlternatePart) of a Part
This example shows you how to retrieve alternates of a part with additional details. Use the following GET request:
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:107801’)?$expand=Alternates($expand=Alternate($select=Name),AlternatePart($select=Identity),AlternateFor($select=Name)) HTTP/1.1
Example: Retrieving Substitutes of a Part
This example shows you how to retrieve substitutes of a Part. Use the following GET request:
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:156011’)?$expand=Substitutes HTTP/1.1
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:156011’)/ Substitutes HTTP/1.1
Example: Retrieving Substitutes with more details (Substitute, SubstituteFor and SubstitutePart) for a Part
This example shows you how to retrieve substitutes of a part with additional details. Use the following GET request:
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:156011’)?$expand=Substitutes($expand=Substitute($select=Name),SubstitutePart($select=Identity),SubstituteFor($select=Quantity)) HTTP/1.1
Example: Retrieving Substitutes of a Part with Details of the Assembly
This example shows you how to retrieve substitutes of a part with additional details of the assembly. Use the following GET request:
GET /Windchill/servlet/odata/ProdMgmt/Parts(‘OR:wt.part.WTPart:156011’)?$expand=Substitutes($expand=Substitute($select=Name),SubstitutePart($select=Identity),SubstituteFor($expand=UsedBy($select=Identity))) HTTP/1.1