Change the Status of a Change Order Using Product Change Orders V2 REST Services

You can use the Product Change Orders V2 resource to update the change order status for the Product Management workflow objects just as you would in the user interface.

Let's discuss these scenarios where, say, James is a product manager awaiting for the change order details to be updated before its sent for approval and has to navigate the change order through different statuses so that it can be approved. He uses REST API to change the statuses of the change order. And, say, James also created another change order that needs to be canceled.

  1. Get change order.

  2. Update the change order status from open to hold.

  3. Update the change order status from hold to open.

  4. Update the change order status from open2 to open1.

  5. Update the change order status from open to interim approval.

  6. Cancel the change order status from draft status.

Get a Change Order

Let's take a change order, ECO_Mobile_2099, that's in open status. Using Product Change Order V2, change the status of the change order to hold.

Example URL

Use this resource URL format:

GET

/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Response

Here's an example of the response body in JSON format:
"items": [
        {
            "ChangeId": 300100567200277,
            "ChangeTypeId": 300100567200117,
            "ChangeNotice": "ECO_Mobile_2099",
            "ChangeName": "ECO_Mobile_2099",
            "Description": "ECO_Mobile_2099",
            "OrganizationId": 204,
            "PriorityCode": null,
            "ReasonCode": null,
            "ChangeTypeValue": "Mobile_Change_Order",
            "OrganizationCode": "V1",
            "PriorityCodeValue": null,
            "ReasonCodeValue": null,
            "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",
            "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",
            "AssignedTo": "PLM_AUTO",
            "RequestedBy": "PLM_AUTO",
            "StatusType": 1,
            "StatusCode": 100000015025034,
            "ApprovalStatus": 1,
            "StatusTypeValue": "Open",
            "StatusCodeValue": "ANR Open",
            "ApprovalStatusValue": "Not submitted for approval",
            "EffectiveImmediatelyFlag": true,
            "EffectivityIncrementDays": 1,
            "CreatedBy": "PLM_AUTO",
            "LastUpdatedBy": "PLM_AUTO",
            "LastUpdateLogin": "EBA0652BB0552113E0531929F80A047D",
            "AssignedToRole": null,
            "ApprovalDateTime": null,
            "NeedByDateTime": null,
            "InitiationDateTime": "2022-10-27T09:40:09+00:00",
            "ImplementationDateTime": null,
            "CancellationDateTime": null,
            "ApprovalRequestDateTime": null,
            "CreationDateTime": "2022-10-27T09:39:38+00:00",
            "LastUpdateDateTime": "2022-10-27T09:40:36+00:00",
            "StatusComments": null,
            "links": [
                {
                    "rel": "self",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277",
                    "name": "productChangeOrdersV2",
                    "kind": "item",
                    "properties": {
                        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000478"
                    }
                },
                {
                    "rel": "canonical",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277",
                    "name": "productChangeOrdersV2",
                    "kind": "item"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderAffectedObject",
                    "name": "changeOrderAffectedObject",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderAttachments",
                    "name": "changeOrderAttachments",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderDFF",
                    "name": "changeOrderDFF",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderNextStatuses",
                    "name": "changeOrderNextStatuses",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderParticipants",
                    "name": "changeOrderParticipants",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderRelationships",
                    "name": "changeOrderRelationships",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderTasks",
                    "name": "changeOrderTasks",
                    "kind": "collection"
                },
                {
                    "rel": "child",
                    "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2/300100567200277/child/changeOrderTeam",
                    "name": "changeOrderTeam",
                    "kind": "collection"
                }
            ]
        }
    ],
    "count": 1,
    "hasMore": false,
    "limit": 25,
    "offset": 0,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/versionproductChangeOrdersV2",
            "name": "productChangeOrdersV2",
            "kind": "collection"
        }
    ]
}

Update the Change Order Status from Open to Hold

James wants to update the status of the change order ECO_Mobile_2099 to hold . He will use a PATCH operation.

Example URL

Use this resource URL format:

PATCH
/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Request

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

{ "StatusTypeValue": "Hold",
    "StatusCodeValue": "ANR Open"

}

Example Response

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

    "ChangeId": 300100567200277,

    "ChangeTypeId": 300100567200117,

    "ChangeNotice": "ECO_Mobile_2099",

    "ChangeName": "ECO_Mobile_2099",

    "Description": "ECO_Mobile_2099",

    "OrganizationId": 204,

    "PriorityCode": null,

    "ReasonCode": null,

    "ChangeTypeValue": "Mobile_Change_Order",

    "OrganizationCode": "V1",

    "PriorityCodeValue": null,

    "ReasonCodeValue": null,

    "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",

    "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",

    "AssignedTo": "PLM_AUTO",

    "RequestedBy": "PLM_AUTO",

    "StatusType": 2,

    "StatusCode": 100000015025034,

    "ApprovalStatus": 1,

    "StatusTypeValue": "Hold",

    "StatusCodeValue": "ANR Open",

    "ApprovalStatusValue": "Not submitted for approval",

    "EffectiveImmediatelyFlag": true,

    "EffectivityIncrementDays": 1,

    "CreatedBy": "PLM_AUTO",

    "LastUpdatedBy": "PLM_AUTO",

    "LastUpdateLogin": "EBA05AF7A2CD2115E0531929F80A5571",

    "AssignedToRole": null,

    "ApprovalDateTime": null,

    "NeedByDateTime": null,

    "InitiationDateTime": "2022-10-27T09:40:09+00:00",

    "ImplementationDateTime": null,

    "CancellationDateTime": null,

    "ApprovalRequestDateTime": null,

    "CreationDateTime": "2022-10-27T09:39:38+00:00",

    "LastUpdateDateTime": "2022-10-27T09:47:44.081+00:00",

    "StatusComments": null,

Update the Change Order Status from Hold to Open

James wants to update of the change order ECO_Mobile_2099 to ANR Open . He will use a PATCH operation first to update the change status to Continue and it will be in the open status from where the change order status updated to hold.

Example URL

Use this resource URL format:

PATCH

/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Request

Here's an example of the request body in JSON format:
{
   "StatusTypeValue": "Continue",
    "StatusCodeValue": "ANR Open"
      
}

Example Response

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

    "ChangeId": 300100567200277,

    "ChangeTypeId": 300100567200117,

    "ChangeNotice": "ECO_Mobile_2099",

    "ChangeName": "ECO_Mobile_2099",

    "Description": "ECO_Mobile_2099",

    "OrganizationId": 204,

    "PriorityCode": null,

    "ReasonCode": null,

    "ChangeTypeValue": "Mobile_Change_Order",

    "OrganizationCode": "V1",

    "PriorityCodeValue": null,

    "ReasonCodeValue": null,

    "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",

    "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",

    "AssignedTo": "PLM_AUTO",

    "RequestedBy": "PLM_AUTO",

    "StatusType": 1,

    "StatusCode": 100000015025034,

    "ApprovalStatus": 1,

    "StatusTypeValue": "Open",

    "StatusCodeValue": "ANR Open",

    "ApprovalStatusValue": "Not submitted for approval",

    "EffectiveImmediatelyFlag": true,

    "EffectivityIncrementDays": 1,

    "CreatedBy": "PLM_AUTO",

    "LastUpdatedBy": "PLM_AUTO",

    "LastUpdateLogin": "EBA05AF927992122E0531929F80ABD08",

    "AssignedToRole": null,

    "ApprovalDateTime": null,

    "NeedByDateTime": null,

    "InitiationDateTime": "2022-10-27T09:40:09+00:00",

    "ImplementationDateTime": null,

    "CancellationDateTime": null,

    "ApprovalRequestDateTime": null,

    "CreationDateTime": "2022-10-27T09:39:38+00:00",

    "LastUpdateDateTime": "2022-10-27T10:06:23.150+00:00",

    "StatusComments": null,

Update the Change Order Status from Open2 to Open1

James wants to update of the change order ECO_Mobile_2099 to ANR Open status where the change order current status is GI Open. He will use a PATCH operation.

Example URL

Use this resource URL format:

PATCH

/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Request

Here's an example of the request body in JSON format:
{
    
    "StatusCodeValue": "ANR Open",
    "StatusComments":"Changing the status to open "      
}

Example Response

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

    "ChangeId": 300100567200277,

    "ChangeTypeId": 300100567200117,

    "ChangeNotice": "ECO_Mobile_2099",

    "ChangeName": "ECO_Mobile_2099",

    "Description": "ECO_Mobile_2099",

    "OrganizationId": 204,

    "PriorityCode": null,

    "ReasonCode": null,

    "ChangeTypeValue": "Mobile_Change_Order",

    "OrganizationCode": "V1",

    "PriorityCodeValue": null,

    "ReasonCodeValue": null,

    "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",

    "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",

    "AssignedTo": "PLM_AUTO",

    "RequestedBy": "PLM_AUTO",

    "StatusType": 13,

    "StatusCode": 300100180498336,

    "ApprovalStatus": 3,

    "StatusTypeValue": " Open",

    "StatusCodeValue": "ANR Open",

    "ApprovalStatusValue": "Submitted for Approval",

    "EffectiveImmediatelyFlag": true,

    "EffectivityIncrementDays": 1,

    "CreatedBy": "PLM_AUTO",

    "LastUpdatedBy": "PLM_AUTO",

    "LastUpdateLogin": "EBA05AB09DA92103E0531929F80AD414",

    "AssignedToRole": null,

    "ApprovalDateTime": null,

    "NeedByDateTime": null,

    "InitiationDateTime": "2022-10-27T09:40:09+00:00",

    "ImplementationDateTime": null,

    "CancellationDateTime": null,

    "ApprovalRequestDateTime": null,   

    "CreationDateTime": "2022-10-27T09:39:38+00:00",
    "LastUpdateDateTime": "2022-11-02T04:56:16.349+00:00",

   "StatusComments": "Changing the status to open"

Update the Change Order Status from Open to Interim Approval

James wants to update of the change order ECO_Mobile_2099 to In Process status. The current status is open. He will use a PATCH operation.

Example URL

Use this resource URL format:

PATCH

/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Request

Here's an example of the request body in JSON format:
{
    
    "StatusCodeValue": "In Process",
    "StatusComments":"Changing the status to interim approval"      
}

Example Response

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

    "ChangeId": 300100567200277,

    "ChangeTypeId": 300100567200117,

    "ChangeNotice": "ECO_Mobile_2099",

    "ChangeName": "ECO_Mobile_2099",

    "Description": "ECO_Mobile_2099",

    "OrganizationId": 204,

    "PriorityCode": null,

    "ReasonCode": null,

    "ChangeTypeValue": "Mobile_Change_Order",

    "OrganizationCode": "V1",

    "PriorityCodeValue": null,

    "ReasonCodeValue": null,

    "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",

    "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",

    "AssignedTo": "PLM_AUTO",

    "RequestedBy": "PLM_AUTO",

    "StatusType": 13,

    "StatusCode": 300100180498336,

    "ApprovalStatus": 3,

    "StatusTypeValue": "Interim approval",

    "StatusCodeValue": "In Process",

    "ApprovalStatusValue": "Submitted for Approval",

    "EffectiveImmediatelyFlag": true,

    "EffectivityIncrementDays": 1,

    "CreatedBy": "PLM_AUTO",

    "LastUpdatedBy": "PLM_AUTO",

    "LastUpdateLogin": "EBA05AB09DA92103E0531929F80AD414",

    "AssignedToRole": null,

    "ApprovalDateTime": null,

    "NeedByDateTime": null,

    "InitiationDateTime": "2022-10-27T09:40:09+00:00",

    "ImplementationDateTime": null,

    "CancellationDateTime": null,

    "ApprovalRequestDateTime": null,

   "CreationDateTime": "2022-10-27T09:39:38+00:00",

   "LastUpdateDateTime": "2022-11-02T04:56:16.349+00:00",

   "StatusComments": "Changing the status to interim approval"

Cancel the Change Order Status from Draft Status

James has another change order that's in draft status. He needs to cancel the change order. He will use a PATCH operation.

Example URL

Use this resource URL format:

PATCH

/fscmRestApi/resources/version/productChangeOrdersV2/300100567200277

Example Request

Here's an example of the request body in JSON format:
{
     "StatusTypeValue":"Cancel",
    "StatusCodeValue": "Draft"
         
}

Example Response

Here's an example of the response body in JSON format:
{
    "ChangeId": 300100566782540,
    "ChangeTypeId": 300100110514407,
    "ChangeNotice": "ECO_20998",
    "ChangeName": "ECO_20998",
    "Description": null,
    "OrganizationId": 204,
    "PriorityCode": null,
    "ReasonCode": null,
    "ChangeTypeValue": "ORA_ENG_CO",
    "OrganizationCode": "V1",
    "PriorityCodeValue": null,
    "ReasonCodeValue": null,
    "AssigneeId": "EE090FD91FAF33D2F3E424B67B06F902",
    "RequestorId": "EE090FD91FAF33D2F3E424B67B06F902",
    "AssignedTo": "PLM_AUTO",
    "RequestedBy": "PLM_AUTO",
    "StatusType": 5,
    "StatusCode": 0,
    "ApprovalStatus": 1,
    "StatusTypeValue": "Canceled",
    "StatusCodeValue": "Draft",
    "ApprovalStatusValue": "Not submitted for approval",
    "EffectiveImmediatelyFlag": true,
    "EffectivityIncrementDays": 1,
    "CreatedBy": "PLM_AUTO",
    "LastUpdatedBy": "PLM_AUTO",
    "LastUpdateLogin": "EE090FD91FAF33D2F3E424B67B06F902",
    "AssignedToRole": null,
    "ApprovalDateTime": null,
    "NeedByDateTime": null,
    "InitiationDateTime": "2022-11-30T00:00:00+00:00",
    "ImplementationDateTime": null,
    "CancellationDateTime": "2022-11-30T11:12:29+00:00",
    "ApprovalRequestDateTime": null,
    "CreationDateTime": "2022-11-30T11:08:12+00:00",
    "LastUpdateDateTime": "2022-11-30T11:12:29+00:00"