Setting Product Effectivities for Process Plans/Operations/Sequences
You can set single or multiple product effectivities (Date, Lot, Unit, or Serial) for single or multiple Process Plans, Operations, or Sequences and their subtypes.
To set product effectivities, you must specify the effectivity-managed object (Process Plans, Operations, or Sequences) OIDs and the product effectivities in the request body.
* 
The request fails and returns an error if you—
Specify an invalid object OID.
Do not provide all required attributes.
Specify an invalid effectivity context, effectivity range, or effectivity format.
Provide a Trace Code that is not compatible with the specified effectivity type.
Request to change the effectivity type.
Example: Setting Product Date Effectivities on Multiple Process Plans
This example shows you how to set product Date effectivities for two Process Plan objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/EffectivityMgmt/SetEffectivities?$expand=Effectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EffectivityManaged": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:205495"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.MPMProcessPlan:205454"
}
],
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-10T00:00:00+02:00",
"EndDate": "2021-10-17T00:00:00+02:00"
}
},
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-11T00:00:00+02:00",
"EndDate": "2021-10-18T00:00:00+02:00"
}
}
]
}
Similarly, you can set other types of product effectivities.
Example: Setting Product Date Effectivities on Multiple Sequences
This example shows you how to set product Date effectivities for two Sequence objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/EffectivityMgmt/SetEffectivities?$expand=Effectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EffectivityManaged": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:205402"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.sequence.MPMSequence:203904"
}
],
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-10T00:00:00+02:00",
"EndDate": "2021-10-17T00:00:00+02:00"
}
},
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-11T00:00:00+02:00",
"EndDate": "2021-10-18T00:00:00+02:00"
}
}
]
}
Similarly, you can set other types of product effectivities.
Example: Setting Product Date Effectivities on Multiple Operations
This example shows you how to set product Date effectivities for two Operation objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/EffectivityMgmt/SetEffectivities?$expand=Effectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EffectivityManaged": [
{
"ID": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:205535"
},
{
"ID": "OR:com.ptc.windchill.mpml.processplan.operation.MPMOperation:205505"
}
],
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-10T00:00:00+02:00",
"EndDate": "2021-10-17T00:00:00+02:00"
}
},
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"EffectivityQualifier": {
"Value": "EXACT"
},
"DateRange": {
"StartDate": "2021-09-11T00:00:00+02:00",
"EndDate": "2021-10-18T00:00:00+02:00"
}
}
]
}
Similarly, you can set other types of product effectivities.