Replace a Component in an Item Structure

You can use the Item Structures REST API and Product Change Orders Version 2 REST API resources to replace a component in an item structure for a product management object.

Replace Item Structure Components Using Item Structures REST API

Let's discuss these scenarios in which John, a product manager for example, prepares the production system for going live and uses REST APIs to do these actions:

  1. Get a item-structure component, Keyboard C1.
  2. Replace the component Keyboard C1 with Keyboard V1.

John must make sure that no other attribute update is done along with the replace action while using the PATCH operation.

Example URL

Use this resource URL format:

PATCH

fscmRestApi/resources/11.13.18.05/itemStructures/300100552003645/child/Component/300100552200838
cURL Command
curl -u username:password -X PATCH -H "Content-Type:application/vnd.vision.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/itemStructures/BillSequenceId/child/Component/ComponentSequenceId"

Example Request

Here's an example of the request body in JSON format:
{
   "ReplacedBy": "Keyboard V1" 
}

Example Response

Here's an example of the response body in JSON format:

{
    "ComponentSequenceId": 300100552200838,
    "OrganizationId": "204",
    "ComponentItemNumber": "Keyboard C1",
    "ComponentItemId": "300100552003646",
    "ChangeNotice": null,
    "ChangeLineId": -1,
    "ItemSequenceNumber": 30,
    "Quantity": 1,
    "Yield": 1,
    "Comments": null,
    "StartDateTime": "2022-04-08T18:15:33+00:00",
    "EndDateTime": "2022-04-11T06:52:02+00:00",
    "ImplementationDateTime": "2022-04-08T18:15:33+00:00",
    "FromNumber": null,
    "ToNumber": null,
    "PlanningPercent": 100,
    "BasisType": 1,
    "BasisValue": "Variable",
    "EnforceIntRequirements": 0,
    "EnforceIntegerRequirementsValue": "None",
    "WipSupplyType": 1,
    "SupplyType": "Push",
    "AutoRequestMaterialFlag": true,
    "MinimumQuantity": null,
    "MaximumQuantity": null,
    "OptionalFlag": false,
    "MutuallyExclusiveFlag": false,
    "CheckATPFlag": false,
    "SoBasis": 2,
    "SalesOrderBasisValue": "None",
    "InstantiabilityCode": null,
    "InstantiabilityValue": null,
    "ShowInSales": null,
    "ShowInSalesValue": null,
    "RequiredToShipFlag": false,
    "RequiredForRevenueFlag": false,
    "IncludeOnShipDocsFlag": false,
    "CreationDateTime": "2022-04-08T18:16:36.799+00:00",
    "LastUpdateDateTime": "2022-04-11T06:52:08.583+00:00",
    "BillSequenceId": 300100552003645,
    "PrimaryUOMValue": "Each",
    "PrimaryUOMCode": "Ea",
    "PrimaryUOMCodeValue": "Each",
    "ACDTypeValue": "Added",
    "CreatedBy": "PLM_AUTO",
    "LastUpdateLogin": "DC267C349B7021DBE0531929F80A41E3",
    "LastUpdatedBy": "PLM_AUTO",
    "ComponentItemClass": "Root Item Class",
    "QuantityRelatedFlag": true,
    "Replaces": null,
    "ReplacedBy": "Keyboard V1",
    "links": [
        {
            "rel": "self",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838",
            "name": "Component",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838",
            "name": "Component",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645",
            "name": "itemStructures",
            "kind": "item"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovReplacedBy",
            "name": "LovReplacedBy",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovShowInSalesValue",
            "name": "LovShowInSalesValue",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovInstantiabilityCodeValue",
            "name": "LovInstantiabilityCodeValue",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovComponentItemNumber",
            "name": "LovComponentItemNumber",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovEnforceIntRequirementsValue",
            "name": "LovEnforceIntRequirementsValue",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovBasisTypeValue",
            "name": "LovBasisTypeValue",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/ComponentUnitOfMeasureVVO",
            "name": "ComponentUnitOfMeasureVVO",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovWIPSupplyTypeValue",
            "name": "LovWIPSupplyTypeValue",
            "kind": "collection"
        },
        {
            "rel": "lov",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/lov/LovSoBasisValue",
            "name": "LovSoBasisValue",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/child/ComponentDFF",
            "name": "ComponentDFF",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/child/ReferenceDesignator",
            "name": "ReferenceDesignator",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/child/SubstituteComponent",
            "name": "SubstituteComponent",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/itemStructures/300100552003645/child/Component/300100552200838/child/WhereUsed",
            "name": "WhereUsed",
            "kind": "collection"
        }
    ]
}

Replace Item Structure Components using Product Change Orders V2 REST API

Let's discuss these scenarios in which John, a product manager for example, prepares the production system for going live and uses REST API to do these:

  1. Get a change-order-affected item-structure component Keyboard C2.
  2. Replace the component Keyboard C2 with Keyboard V2.

John must make sure that no other attribute update done along with the replace action while using PATCH operation.

Example URL

Use this resource URL format:

PATCH

fscmRestApi/resources/11.13.18.05/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271/child/affectedItemStructureComponent/300100552488272

Example Request

Here's an example of the request body in JSON format:
{
   "ReplacedBy": "Keyboard V2" 
}

Example Response

Here's an example of the response body in JSON format:
{
    "ComponentQuantity": 1,
    "ComponentYieldFactor": 1,
    "ComponentRemarks": null,
    "OldComponentSequenceId": null,
    "ComponentSequenceId": 300100552488272,
    "BillSequenceId": 300100552488271,
    "ChangeId": null,
    "ChangeLineId": -1,
    "PrimaryUomCode": "Ea",
    "ACDTypeCode": 1,
    "ComponentItemId": "300100552488264",
    "OrganizationId": "204",
    "AlternateBOMDesignator": "Primary",
    "OrganizationCode": "V1",
    "ChangeNotice": null,
    "ComponentItemClass": "Root Item Class",
    "QuantityRelatedFlag": true,
    "ItemSequenceNumber": 30,
    "ComponentItemNumber": "Keyboard C2",
    "PrimaryUOMValue": "Each",
    "LastUpdateDateTime": "2022-04-11T07:27:39.807+00:00",
    "CreationDateTime": "2022-04-11T07:26:22.774+00:00",
    "EffectivityDateTime": "2022-04-11T07:26:22+00:00",
    "ImplementationDateTime": "2022-04-11T07:26:22+00:00",
    "DisableDateTime": null,
    "Replaces": null,
    "ReplacedBy": "Keyboard V2",
    "links": [
        {
            "rel": "self",
            "href": "https://server/fscmRestApi/resources/version/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271/child/affectedItemStructureComponent/300100552488272",
            "name": "affectedItemStructureComponent",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://server/fscmRestApi/resources/version/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271/child/affectedItemStructureComponent/300100552488272",
            "name": "affectedItemStructureComponent",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://server/fscmRestApi/resources/version/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271",
            "name": "changeOrderAffectedItemStructure",
            "kind": "item"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271/child/affectedItemStructureComponent/300100552488272/child/affectedItemReferenceDesignator",
            "name": "affectedItemReferenceDesignator",
            "kind": "collection"
        },
        {
            "rel": "child",
            "href": "https://server/fscmRestApi/resources/version/productChangeOrdersV2/300100552488365/child/changeOrderAffectedObject/00020000000EACED00057708000110F09AD3F5BE0000000EACED00057708000110F09AD3F5BE/child/changeOrderAffectedItemStructure/300100552488271/child/affectedItemStructureComponent/300100552488272/child/affectedItemSubstituteComponent",
            "name": "affectedItemSubstituteComponent",
            "kind": "collection"
        }
    ]
}