Changing the State of Procurement Contract Workspace Using the Contract Workspace Modification API

Use this procedure to change the state of a procurement contract workspace.

Prerequisites

Context

You can change the status of a contract workspace to OnHold, Draft, DraftAmendement, and Closed by using the POST /contractWorkspaces/{contractId}/state endpoint of the Contract Workspace Modification API. When you want to update a procurement contract workspace that is in the published state, you must change the state of the contract workspace using the amend action. Once contract workspace is updated, we can either publish contract workspace or call the completeAmendment action.

Procedure

  1. Obtain the ID of the contract workspace for which you want to change the state.
  2. Invoke the /contractWorkspaces/{contractId}/state endpoint.
    POST {{runtime_url}}/contractWorkspaces/{contractId}/state?user=user1&passwordAdapter=pwd1&realm=realm1
    {
      "action": "amend" | "completeAmendment" | "putOnHold" | "resume" | "close" 
    }
     
    where
    contractId
    denotes the ID of the contract workspace that you want to update.
    action
    specifies the action you want to perform on the workspace. Valid values: amend, completeAmendment, putOnHold, resume, and close.
    Refer to the following table for the sample request body and response you receive on successfully submitting this endpoint for each action value.

    When the action Value is...

    From State

    Sample Request Body

    Response You Receive...

    amend

    • Published

    {
      "action": "amend",
      "amendAttributes": {
        "amendmentType": "Administrative" | "PriceUpdate",
        "amendmentReason": "performing amendment",
        "isTemplateUpgradeRequired": true
      }
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "Published",
      "version": 3
      "displayVersion": "v2 (editing)",
      "warnings": [
        "string"
      ]
    }
    {
      "action": "amend",
      "amendAttributes": {
        "amendmentType": "Renewal" | "Amendment" | "Termination",
        "amendmentReason": "performing amendment",
        "isTemplateUpgradeRequired": true
      }
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "DraftAmendment",
      "version": 3,
      "displayVersion": "v2 (editing)",
      "warnings": [
        "string"
      ]
    }

    Closed (non-published Administrative or PriceUpdate amendment)

    {
      "action": "amend",
      "amendAttributes": {
        "amendmentType": "Administrative" | "PriceUpdate",
        "amendmentReason": "performing amendment",
        "isTemplateUpgradeRequired": true
      }
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "Closed",
      "version": 3,
      "displayVersion": "v2 (editing)",
      "warnings": [
        "string"
      ]
    }

    Closed (non-published Amendment, Renewal, or Termination amendment)

    {
      "action": "amend",
      "amendAttributes": {
        "amendmentType": "Amendment" | "Renewal" | "Termination",
        "amendmentReason": "performing amendment",
        "isTemplateUpgradeRequired": true
      }
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "DraftAmendment",
      "version": 3,
      "displayVersion": "v2 (editing)",
      "warnings": [
        "string"
      ]
    }

    completeAmendment

    • Published

    • Closed (non-published Administrative or PriceUpdate amendment)

    {
      "action": "completeAmendment"
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "Published" | "Closed",
      "version": 3
      "displayVersion": "v3",
      "warnings": [
        "string"
      ]
    }

    putOnHold

    • Draft

    • DraftAmendment

    {
        "action": "putOnHold"    
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "OnHold",
      "version": 1,
      "displayVersion": "Original",
      "warnings": [
        "string"
      ]
    }

    Published

    {
        "action": "putOnHold"    
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "OnHold",
      "version": 1,
      "displayVersion": "v1",
      "warnings": [
        "string"
      ]
    }

    resume

    OnHold (when you put a Draft contract workspace on hold)

    {
        "action": "resume"    
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "Draft",
      "version": 1,
      "displayVersion": "Original",
      "warnings": [
        "string"
      ]
    }

    OnHold (when you put a DraftAmendment contract workspace on hold)

    {
      "contractId": "CW1234",
      "contractStatus": "DraftAmendment",
      "version": 1,
      "displayVersion": "Original",
      "warnings": [
        "string"
      ]
    }

    OnHold (when you put a Published contract workspace on hold)

    {
        "action": "resume",
        "amendAttributes": {
            "amendmentReason": "amendment reasons",
            "isTemplateUpgradeRequired": "true"
        }
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "DraftAmendment",
      "version": 2,
      "displayVersion": "v1 (editing)",
      "warnings": [
        "string"
      ]
    }

    close

    • Draft

    • DraftAmendement

    • Published

    {
        "action": "close"    
    }
     
    {
      "contractId": "CW1234",
      "contractStatus": "Closed",
      "version": 1,
      "displayVersion": "v1",
      "warnings": [
        "string"
      ]
    }
    where
    amendmentType
    indicates the type of amendment. The supported values are Administrative, Renewal, Amendment, Termination, and PriceUpdate.
    amendmentReason
    specifies the reason for the amendment.
    isTemplateUpgradeRequired
    indicates whether the amendment requires a template upgrade. Supported values are true and false.
    contractStatus
    indicates the status of the contract after changing the state. Valid values: DraftAmendement, OnHold, Draft, and Closed.
    version
    indicates the version of the contract workspace after the updates are made.
    displayVersion
    indicates the current version of the contract workspace as displayed in UI.
    warnings
    contains any warning messages.