Updating the Common Attributes of a Part
Using this request, you can update the common attributes a part.
To update the common attributes a part along with optionally specifying the owning organization attribute, set the Expose Organization preference to Yes in the Preference Management utility in Windchill.
|
In the Preference Management utility in Windchill, if the Expose Organization and Expose Organization Only for Windchill Supplier Management Parts preferences are set to Yes and the Expose Organization for Change Management Objects preference is set to No, the owning organization is a required attribute and can be specified only for the supplier management parts.
|
Example: Updating the Common Attributes of a Part When the “Expose Organization” Preference is Set to “No”
This example shows you how to update the common attributes of a part. In this example, set the Expose Organization preference to No in the Preference Management utility in Windchill.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:918283')/PTC.ProdMgmt.UpdateCommonProperties
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Updates": {
"Name": "UpdatedWTPart",
"Number": "New001",
"DefaultTraceCode": {
"Value": "L",
"Display": "Buy"
}
}
}
Example: Updating the Common Attributes of a Part When the “Expose Organization” Preference is Set to “Yes”
This example shows you how to update the common attributes along with specifying the owning organization for the specified part. In this example, set the Expose Organization preference to Yes in the Preference Management utility in Windchill.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:918213')/PTC.ProdMgmt.UpdateCommonProperties
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Updates": {
"Name": "UpdateWTPart",
"Organization@odata.bind": "Organizations('OR:wt.org.WTOrganization:118052')",
"EndItem": true,
"AssemblyMode": {
"Value": "separable",
"Display": "Separable"
},
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "L"
},
"Source": {
"Value": "make"
},
"GatheringPart": true,
"PhantomManufacturingPart": true,
"ConfigurableModule": {
"Value": "standard"
}
}
}
Example: Updating the Common Attributes of a Supplier Part When the “Expose Organization” Preference is Set to “Yes”
This example shows you how to update the common attributes along with specifying the owning organization for the specified supplier part (here, manufacturer part). In this example, set the Expose Organization preference to Yes in the Preference Management utility in Windchill.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('OR:com.ptc.windchill.suma.part.ManufacturerPart:279072')/PTC.ProdMgmt.UpdateCommonProperties
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Updates": {
"Name": "UpdateMfgPart",
"Organization@odata.bind": "Organizations('OR:wt.org.WTOrganization:118852')",
"EndItem": true,
"AssemblyMode": {
"Value": "separable",
"Display": "Separable"
},
"DefaultUnit": {
"Value": "ea"
},
"DefaultTraceCode": {
"Value": "L"
},
"Source": {
"Value": "make"
},
"GatheringPart": true,
"PhantomManufacturingPart": true,
"ConfigurableModule": {
"Value": "standard"
}
}
}