Creating Multiple Process Materials
The following example shows how to create multiple process materials. Use the following POST request with the request body:
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessMaterials HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessMaterials": [
{
"Name": "ProcessMaterialTest001",
"Category": {
"Value": "Coolant"
},
"Description": "Description field test",
"View": "Design",
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:197295')",
"DefaultUnit": {
"Value": "ea"
},
"Source": {
"Value": "make"
},
"Usage": {
"Value": "AllUsage"
}
},
{
"Name": "ProcessMaterialTest002",
"Category": {
"Value": "Coolant"
},
"Description": "Description field test",
"View": "Design",
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:197295')",
"DefaultUnit": {
"Value": "ea"
},
"Source": {
"Value": "make"
},
"Usage": {
"Value": "AllUsage"
}
}
]
}
You can also assign single-valued or multi-valued Security Labels for single or multiple Process Materials.
Example: Assigning Single-valued Security Label for Multiple Process Materials
This example shows you how to create two Process Material objects with single-valued security label. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessMaterials
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessMaterials": [
{
"Name": "Process Material 1.3.1",
"DefaultUnit": {
"Value": "ea"
},
"Category": {
"Value": "Cleaner"
},
"Source": "make",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "CUSTOM"
},
{
"Name": "Process Material 1.3.2",
"DefaultUnit": {
"Value": "ea"
},
"Category": {
"Value": "Cleaner"
},
"Source": "make",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC"
}
]
}
Example: Assigning Multi-valued Security Label for Multiple Process Materials
This example shows you how to create two Process Material objects with multi-valued security label. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/MfgProcMgmt/CreateProcessMaterials
Request Header
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"ProcessMaterials": [
{
"Name": "Process Material 1.4.1",
"DefaultUnit": {
"Value": "ea"
},
"Category": {
"Value": "Cleaner"
},
"Source": "make",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
},
{
"Name": "Process Material 1.4.2",
"DefaultUnit": {
"Value": "ea"
},
"Category": {
"Value": "Cleaner"
},
"Source": "make",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:113009')",
"EXPORTCONTROL": "LNC,CUSTOM"
}
]
}