PATCH /hub/v1/approvals-v2/{id}

Modifies the name, description, and deadline of an existing approval item. The response contains details of the approval and workflow items, including the current state and available transitions based on the current user’s roles.

URL Parameters

Name Type Description
id string Required. The ID of the workflow item to update.

JSON Parameters

Name Type Description
name string Required. Name of the approval item
description string Required. Description for approval item
hasDeadline string Required. Indicates if the approval item has a deadline
Deadline string Required. The deadline for the approval item. If the value of hasDeadline is true, the API expects deadline to include a time offset, for example, ‘2016-05-01T14:18:12.430’. If the value of hasDeadline is false, set this value to NULL.

Responses

Status Name Type Description
200     200 OK.
  approvalItemId string The ID of the approval item
  objectType string The object type of the approval item
  objectId string The unique ID of the object associated with the approval item
  name string The name of the approval item
  description string A description of the approval item
  workflowItemId string The ID of the workflow item
  workflowState string Workflow state of the approval item
  workflowType string Type of workflow
  workflowName string Name of the workflow
  deadline array Deadline for the approval item
  commentCounts.open string Number of comments that are open
  commentCounts.addressed string Number of comments that are addressed
  commentCounts.completed string Number of comments that are completed
  commentCounts.total string Total number of comments
  workflowItem.workflowItemId string The ID of the workflow item
  workflowItem.workflowRound string Workflow round
  workflowItem.type string Workflow type
  workflowItem.currentState object Current state of the workflow
  workflowItem.currentState.stateId string The ID of the current state of the workflow
  workflowItem.currentState.stateName string Current state name
  workflowItem.currentState.isEndState string Indicates whether the workflow item is in the final state
  workflowItem.currentState.modifiedDate string The date the workflow item is modified
  workflowItem.availableTransitions array Collection of available workflow states
  workflowItem.availableTransitions.id string The ID of the available workflow state
  workflowItem.availableTransitions.name string Name of the available workflow state
  workflowItem.availableTransitions.isPersistable string Defines if the workflow item is persistable
  blocked string Defines if emails will be sent out. If blocked = true, then emails won't be sent.
       
404     No active approval with the given id exists.
  message string No active approval exists that contains the specified ID.
  errorcode string Error code for the exception (30003)
       
400_IdRequired     Id is required.
  message string ID is a required field.
  errorcode string Error code for the exception (10002)
       
400_HasDeadlineRequired     HasDeadline is required.
  message string HasDeadline is required.
  errorcode string Error code for the exception (10002)
       
400_DeadlineRequired     Deadline is required.
  message string Deadline is required.
  errorcode string Error code for the exception (10002)