Actions Available in the PTC Product Management Domain
The following are some of the key actions available in the PTC Product Management domain:
* 
The GetBOM and GetBOMWithInlineNavCriteria actions are deprecated and will be removed in a future release of Windchill REST Services. PTC recommends that you use the GetPartStructure action instead.
The GetPartsList action is deprecated and will be removed in a future release of Windchill REST Services. PTC recommends that you use the GetMultiLevelComponentsReport action instead.
GetBOM
The action GetBOM returns the bill of materials (BOM) for the product structure. The action is bound to the entity NavigationCriteria, that is, to the filter saved in Windchill.
When you call the GetBOM action, you can specify the ID of the NavigationCriteriain the request body. This is the ID of the saved filter you want to use as the filter criteria. If you do not specify the ID of the filter in the request body, then the default filter is used to work with the product structure. Alternatively, you can specify the inline navigation criteria in the request payload.
You can apply Plant Filters or Plant Config Specs as the Navigation criteria. For example if you specify the navigation criteria ID for Plant Filters, only the plants that meet the specified navigation criteria will be shown in the response:
POST /ProdMgmt/Parts('<Part OID>')/PTC.ProdMgmt.GetBOM?$expand=Components($select=PartName;$levele=4)

{

"NavigationCriteriaID:" "ID Value"
}
GetBOMWithInlineNavCriteria
The action GetBOMWithInlineNavCriteria returns the bill of materials (BOM) for the product structure. Pass the navigation criteria as the input parameter. The action is bound to the entity NavigationCriteria, that is, to the filter saved in Windchill. You can pass partial representation of the navigation criteria.
If the navigation criteria contains the property ApplyToTopLevelObject, which is set as true, and no qualifying version is found for the top level object, a relevant error message is returned.
For example, the following partial navigation criteria returns the Bill of Material for Manufacturing view that includes working copies of parts.
POST /ProdMgmt/Parts(<oid>)/PTC.ProdMgmt.GetBOMWithInlineNavCriteria

{
"NavigationCriteria": {
"ApplyToTopLevelObject": true,
"ApplicableType": "wt.part.WTPart",
"ConfigSpecs": [
{
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
"WorkingIncluded": true,
"View": "Manufacturing"
}
]
}
}
You can also specify either Plant Filter or Plant Config specs or both, as inline navigation criteria in the request body.
GetPartStructure
The action GetPartStructure returns the bill of materials (BOM) for a product structure along with path details for occurrences. The action returns the product structure using a hierarchy of entities called Components. The action is bound to the entity NavigationCriteria, that is, to the filter saved in Windchill.
The return type is the PartStructureItem entity.
When you call the GetPartStructure action, you can specify the ID of the NavigationCriteria in the request body. This is the ID of the saved filter you want to use as the filter criteria. If you do not specify the ID of the filter in the request body, then the default filter is used to work with the product structure. Alternatively, you can specify the inline navigation criteria in the request payload.
When you call the GetPartStructure action, the Components entity additionally returns the following attributes in the response:
Resolved–The attribute indicates whether a part is resolved by the configuration specification specified in the navigation criteria.
The attribute returns the Boolean value true or false depending on whether the part is resolved or not. The value is returned as true when you have access to the version of the part selected by the navigation criteria. The value is returned as false when you do not have access to the part or if no part version is selected by the navigation criteria.
* 
When navigation criteria is not provided in the request body and you do not have access to the part which is in any one of the states such as Latest, In Work, only Latest, or Released, the part is unresolved.
HasUnresolvedObjectsByAccessRights–The attribute indicates whether you have access to all parts in the structure returned in the response. The value is only set on the top-level or parent part specified in the request URL.
The attribute returns the Boolean value true or false only for the specified top-level or parent part. The value is returned as null for all child components. The value is returned as false when you have access to the child parts. The value is returned as true when one or more child components at any level in its structure are unresolved and you do not have access to those.
HasChildren–The attribute indicates whether the Components entity has child components. The attribute is designed to return information when you want to create UIs that do not expand the entire structure, but need an indication if a component can be expanded to another level.
The attribute returns the Boolean value true or false. The value is returned as true for the components with child components that are resolved and have uses links to other child components. The value is returned as true for each child component that can be further expanded until the leaf node. The value is returned as false for the component that has no child components or is unresolved. The value is also returned as false for the leaf node.
* 
The value of HasChildren is returned as false for a child part in any of the following cases:
When you do not have access to the child part.
When the configuration specification in the applied navigation criteria does not resolve the child part version.
PathId is the occurrence path of the component part in the BOM structure. The complete path from the root of the BOM structure is returned. This URL can be used in path filters to filter on the specific component.
PVTreeId is the occurrence path of the component part in the viewable file. The complete path from the root of the BOM structure is returned. This URL can be used to work with Visualization tree. For example, in an application you consume this URL and highlight the component in the Visualization tree.
PVParentTreeId is the occurrence path to the parent of the component part in the viewable file. The complete path from the root of the BOM structure is returned.
When you call the GetPartStructure action along with expand on occurrences, the component along with its details is returned as many times as the component is available in the BOM structure.
For example, consider a part A1 which has the following components:
Component C1—Quantity 2 with occurrences R1 and R2
Component C2—Quantity 1 with no occurrences
When you use the GetPartStructure action with occurrences to get the BOM, the following response is returned:
{
"PartId": "<oid",
"PartName": "A1"
"PartUseId": null,
"HasChildren": true,
"PathId": null,
"Resolved": true,
"HasUnresolvedObjectsByAccessRights": false,
"PVTreeId": "/",
"PVParentTreeId": null,
"Part": {
"ID": "<oid>",
"Name": "A1",
...
},
"PartUse": null,
"Ocurrences": [],
"Components": [
{
"PartName": "C1"
"PartUseId": "<linkoid>",
"PartId": "<pathidofcomponent>",
"PVTreeId": "<treeidfromviz>",
"PVParentTreeId": "<parenttreeidfromviz>",
"Part": {
"ID": "<oid>",
"Name": "C1",
...
},
"PartUse": {
"ID": "<linkoid>",
"Qty": 1,
...
},
"Ocurrence": {
"ID": "<occoid>",
"ReferenceDesignator": "R1"
...
},
"Components": []
},
{
"PartName": "C1"
"PartUseId": "<linkoid>",
"PartId": "<pathidofcomponent>",
"PVTreeId": "<treeidfromviz>",
"PVParentTreeId": "<parenttreeidfromviz>",
"Part": {
"ID": "<oid>",
"Name": "C1",
...
},
"PartUse": {
"ID": "<linkoid>",
"Qty": 1,
...
},
"Ocurrence": {
"ID": "<occoid>",
"ReferenceDesignator": "R2"
...
},
"Components": []
},
{
"PartName": "C2"
"PartUseId": <linkoid>",
"PartId": "<pathidofcomponent>",
"PVTreeId": "<treeidfromviz>",
"PVParentTreeId": "<parenttreeidfromviz>",
"Part": {
"ID": "<oid>",
"Name": "C2",
...
},
"PartUse": {
"ID": "<linkoid>",
"Qty": 1,
...
},
"Ocurrences": [],
"Components": []
}
]
}
The PartStructureItem entity has the following additional navigation properties (for version 5 and higher of the ProdMgmt domain):
Alternates—A collection of the entity PartAlternateLink that provides navigation from a part structure item to its alternates. The same set of alternates will be returned with each occurrence of a child component in the BOM if used along with expand on occurrence.
Substitutes—A collection of the entity PartSubstituteLink that provides navigation from a part structure item to its substitutes. The same set of substitutes will be returned with each occurrence of a child component in the BOM if used along with expand on occurrence.
* 
Alternates and Substitutes are not available for Windchill 11.0 M030. If you use attempt to use GetPartStructure with these navigation properties you will get an HTTP Status Code – NOT_IMPLEMENTED.
GetPartsList
The action GetPartsList returns a consolidated flat list of components for the specified part structure. The action returns:
Number of occurrences, that is, quantity of the component in the part list. Each component is only listed once with a consolidated total quantity.
Unit of the component.
To get more details on the components of a part structure, specify the value application/json;odata.metadata=full in the Accept header of the HTTP request. The odata.metadata parameter controls how much information is included in the response. When you specify the value as full, the response includes all the information.
When you specify the OID of the part and Accept header value application/json;odata.metadata=full in the URL request, the action GetPartsList() returns the following information:
OData type for the part component
Quantity of the part component in the specified part structure
Unit of the component
Navigation URL to the part component
You can expand the Part and PartUses navigation properties for more details of the components.
GetMultiLevelComponentsReport
The GetMultiLevelComponentsReport action returns a consolidated flat list of leaf node components and their total quantity within an entire part structure when the ShowSingleLevelReport flag is false. A leaf node component that is used multiple times is listed only once with its total quantity. The action returns the following information for each consolidated leaf node component:
Total quantity
Unit of measure
The consolidation of multiple uses of a leaf node component is based on their Unit. The action consolidates uses of the same unit and returns them as one leaf node with the total quantity and its unit.
When the value of ShowSingleLevelReport is specified as true in the request body, the action returns a consolidated flat list of components and their total quantity that are directly used by the specified part structure. A component that is used multiple times is listed only once with the total quantity and its unit.
When ShowSingleLevelReport is not specified in the request body, its default value is false.
* 
This action is unlike the GetPartStructure action and does not list the levels of parts and the part-component relationships within an entire part structure.
The action is bound to the NavigationCriteria entity, that is, to the filter saved in Windchill.
You can expand the Part navigation property for more details about the consolidated component.
UpdateCommonProperties
The action UpdateCommonProperties edits the common properties of parts. The action is available only if you set the hasCommonProperties property to true in the Parts.json file.
The action must not be called on objects that are checked out.
CreateAssociations
The action CreateAssociations is an unbound action that creates a single or multiple associations between parts and CAD documents. This action is available for version 5 or later of the Product Management domain. You must pass a collection of PartDocAssociation entities in the request body for this action. For each association that you want to create, each entity in the input contains the association type, Parts@odata.bind annotation for part ID, and CADDocuments@odata.bind annotation for CAD document ID.
The return type is a corresponding collection of PartDocAssociation.
The part must be checked out using the endpoint ProdMgmt.Part.CheckOut before you use this action, except in the case of creating an image association when the part does not need to be checked out. The action fails if the association already exists. When you create multiple associations, if any one association fails, the complete transaction fails. When creating multiple associations, if the HTTP ‘Prefer’ Header is set to a value return=minimal, the response code is 204 with an empty body. In this case, the associations are created, and an empty response is returned.
* 
When the Calculated association type is specified along with other association types in the request body, the request skips the creation of the calculated association.
When only the Calculated association type is specified in the request body, the request skips the creation of the calculated association. Because there is no association to create, the request returns the 200 status code.
The creation of a calculated association is skipped even though you do not have access to the part or CAD document.
DeleteAssociations
The action DeleteAssociations deletes a single or multiple associations between parts and CAD documents. This action is available for version 5 or later of the Product Management domain. The action can only be executed on objects that are checked out, except in the case of images when the part need not be checked out to delete the association. You must pass a collection of PartDocAssociation entities in the request body for this action. It returns 204 HTTP code with no response.
Multiple associations can be deleted in a single transaction, but if any one association cannot be deleted because of invalid input parameters, the complete transaction fails.
* 
When the Calculated association type is specified along with other association types in the request body, the request skips the deletion of the calculated association.
When only the Calculated association type is specified in the request body, the request skips the deletion of the calculated association. Because there is no association to delete, the request returns the 204 status code.
The deletion of a calculated association is skipped even though you do not have access to the part or CAD document.
CreateParts
The action CreateParts creates single or multiple parts in a single call. You must pass a collection of Parts entities in the request body for this action.
UpdateParts
The action UpdateParts updates single or multiple parts in a single call. You must pass a collection of Parts entities in the request body for this action.
GetExtendedDatasWithInlineNavCriteria
The action GetExtendedDatasWithInlineNavCriteria returns the extended data objects for a Part for the inline navigation criteria passed in NavigationCriteriain the request payload. You can filter the data on either Plant Filters or Config specs or both.
UpdatePrimaryCoproduceLinks
The action UpdatePrimaryCoproduceLinks updates single or multiple secondary Co-produce links for a Co-produce part in context of Change (Change Task or Change Notice).This action is available for v5 onwards of the Product Management domain.
The action is bound to the entity NavigationCriteria, that is, to the filter saved in Windchill.
When you call the UpdatePrimaryCoproduceLinks action, you can specify the ID of the NavigationCriteria in the request body of the URL. Alternatively, you can provide the inline navigation criteria in the request payload.
UpdateRawMaterialLinks
The action UpdateRawMaterialLinks updates single or multiple manufacturing Raw Material Links for a Part object. You can optionally provide Change Notice or Change Task ID for tracking the updated Raw Material Links. When the Track “Made From” History Through Change Notice preference is set to Yes, you must specify the ChangeOid attribute and its value. This action is available from v5 onwards of the Product Management domain.
UpdateRawMaterialAlternateLinks
The action UpdateRawMaterialAlternateLinks updates single or multiple Raw Material Alternate Made From Links for a Part object in context of Change (Change Task or Change Notice). When the preference Track “Made From” History Through Change Notice is set to Yes, you must specify the ChangeOid attribute and its value. This action is available from v5 onwards of the Product Management domain.
CreateUses
The action CreateUses creates single or multiple part usage links with or without occurrences. This action is available for v5 onwards of the Product Management domain. The action can only be executed when the parent part is checked out. To execute this action, you must pass a collection of Occurrences along with the PartUses entities in the request body for creating part usage links with occurrences.
EditPartsSecurityLabels
The EditPartsSecurityLabels action enables you to edit the Security Labels for Parts.
UploadStage1Action
The UploadStage1Action action is the first stage for uploading attachments to a part. The action enables you to specify the number of files to attach for uploading them to a part.
* 
To perform this action, you must set the Part Management > Attachments on parts preference to Yes in the Preference Management utility in Windchill.
UploadStage3Action
The UploadStage3Action action is the final stage for uploading attachments to a part. The action enables you to specify StreamId and other attributes for each file attachment, specified in the UploadStage1Action request, for uploading them to a part.
* 
To perform this action, you must set the Part Management > Attachments on parts preference to Yes in the Preference Management utility in Windchill.
Was this helpful?