Creating Multiple Department Data Objects for a Specific Plant Data Object
This example shows you how to create multiple Department Data objects for a specific Plant Data object. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/BomTransformation/CreateDepartmentDataForPlantData?$expand=DepartmentData
|
You must apply $expand on DepartmentData, otherwise an empty list is returned.
|
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"plantData": [
{
"ID": "OR:com.ptc.windchill.enterprise.data.EnterpriseData:200886"
}
],
"departmentData": [
{
"@odata.type": "#PTC.BomTransformation.Logistics",
"Category": "process",
"Location": "004",
"SupplyChain": "005"
},
{
"@odata.type": "#PTC.BomTransformation.Logistics",
"Category": "procurement",
"Location": "003",
"SupplyChain": "001"
}
]
}