Updating Product Effectivities for an Effectivity-managed Part Object
You can update single or multiple product effectivities (Date, Lot, Block, and Unit(Serial)) for a part or its subtype.
To update the product effectivities, you must specify the product effectivity OIDs, effectivity type, and the effectivity ranges in the request body.
You can also update effectivity qualifier and effectivity context.
* 
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.
* 
If you do not provide the effectivity type (@odata.type), the default effectivity type is used. As the specified attribute for the default type is not modeled, you get an error message that the attribute is invalid, for example, "'PendingDateRange' cannot be mapped as a property or an annotation."
Example: Updating a Product Date Effectivity
This example shows you how to update a product Date effectivity on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:219826')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"ID": "OR:wt.effectivity.WTDatedEffectivity:219845",
"DateRange": {
"StartDate": "2029-03-01T00:00:00+01:00",
"EndDate": "2099-03-05T00:00:00+01:00"
},
"EffectivityQualifier": {
"Value": "NO_LATER_THAN",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:219848')"
}
]
}
Example: Updating Multiple Product Date Effectivities
This example shows you how to update two product Date effectivities on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"ID": "OR:wt.effectivity.WTDatedEffectivity:203511",
"DateRange": {
"StartDate": "2010-03-05T00:00:00+01:00",
"EndDate": "2010-03-16T00:00:00+01:00"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
},
{
"@odata.type": "#PTC.EffectivityMgmt.DateEffectivity",
"ID": "OR:wt.effectivity.WTDatedEffectivity:203510",
"DateRange": {
"StartDate": "2020-03-05T00:00:00+01:00",
"EndDate": "2022-03-16T00:00:00+01:00"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}
Example: Updating a Product Lot Effectivity
This example shows you how to update a product Lot effectivity on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.LotEffectivity",
"ID": "OR:wt.part.ProductLotNumberEffectivity:201812",
"UnitRange": {
"RangeStart": "test1",
"RangeEnd": "test2"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}
Example: Updating Multiple Product Lot Effectivities
This example shows you how to update two product Lot effectivities on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.LotEffectivity",
"ID": "OR:wt.part.ProductLotNumberEffectivity:201811",
"UnitRange": {
"RangeStart": "test1",
"RangeEnd": "test2"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
},
{
"@odata.type": "#PTC.EffectivityMgmt.LotEffectivity",
"ID": "OR:wt.part.ProductLotNumberEffectivity:201812",
"UnitRange": {
"RangeStart": "test3",
"RangeEnd": "test4"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}
Example: Updating a Product Block Effectivity
This example shows you how to update a product Block effectivity on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.BlockEffectivity",
"ID": "OR:wt.part.ProductBlockEffectivity:200060",
"UnitRange": {
"RangeStart": "55",
"RangeEnd": "112"
},
"EffectivityQualifier": {
"Value": "NO_LATER_THAN",
"Display": "No later than"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}
Example: Updating Multiple Product Block Effectivities
This example shows you how to update two product Block effectivities on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.BlockEffectivity",
"ID": "OR:wt.part.ProductBlockEffectivity:201965",
"UnitRange": {
"RangeStart": "@8",
"RangeEnd": "@8"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:201916')"
},
{
"@odata.type": "#PTC.EffectivityMgmt.BlockEffectivity",
"ID": "OR:wt.part.ProductBlockEffectivity:201966",
"UnitRange": {
"RangeStart": "@9",
"RangeEnd": "@9"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:201916')"
}
]
}
Example: Updating a Product Serial Effectivity
This example shows you how update a product Serial effectivity on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.SerialNumberEffectivity",
"ID": "OR:wt.part.ProductSerialNumberEffectivity:201837",
"UnitRange": {
"RangeStart": "555",
"RangeEnd": "555"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}
Example: Updating Multiple Product Serial Effectivities
This example shows you how to update two product Serial effectivities on a part specified in the request URI. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ProdMgmt/Parts('VR:wt.part.WTPart:203514')/PTC.ProdMgmt.ModifyEffectivities
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Effectivities": [
{
"@odata.type": "#PTC.EffectivityMgmt.SerialNumberEffectivity",
"ID": "OR:wt.part.ProductSerialNumberEffectivity:201836",
"UnitRange": {
"RangeStart": "550",
"RangeEnd": "550"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
},
{
"@odata.type": "#PTC.EffectivityMgmt.SerialNumberEffectivity",
"ID": "OR:wt.part.ProductSerialNumberEffectivity:201837",
"UnitRange": {
"RangeStart": "555",
"RangeEnd": "555"
},
"EffectivityQualifier": {
"Value": "EXACT",
"Display": "Exact"
},
"EffectivityContext@odata.bind": "PartEffectivityContexts('OR:wt.part.WTPartMaster:200062')"
}
]
}