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.

NameTypeDescription
idstringRequiredId of the workflow item to be updated
NameTypeDescription
namestringRequiredName of the approval item
descriptionstringRequiredDescription for approval item
hasDeadlinestringRequiredIndicates if the approval item has a deadline
DeadlinestringRequiredDeadline for approval item. If hasDeadline = true, the API expects deadline to include a time offset, for example, ‘2016-05-01T14:18:12.430’. If hasDeadline = false, the API expects the deadline to be set to NULL.
StatusNameTypeDescription
200  200 OK.
 approvalItemIdstringId of approval item
 objectTypestringObject type for the approval item
 objectIdstringUnique Id of the object associated with the approval item
 namestringName of approval item
 descriptionstringDescription of the approval item
 workflowItemIdstringId of the workflow item
 workflowStatestringWorkflow state of the approval item
 workflowTypestringType of workflow
 workflowNamestringName of the workflow
 deadlinearrayDeadline for the approval item
 commentCountsobjectComment counts
 commentCounts.openstringNumber of comments that are open
 commentCounts.addressedstringNumber of comments that are addressed
 commentCounts.completedstringNumber of comments that are completed
 commentCounts.totalstringTotal number of comments
 workflowItemobjectWorkflow item object
 workflowItem.workflowItemIdstringWorkflow item Id
 workflowItem.workflowRoundstringWorkflow round
 workflowItem.typestringWorkflow type
 workflowItem.currentStateobjectCurrent state of the workflow
 workflowItem.currentState.stateIdstringId of the current state
 workflowItem.currentState.stateNamestringCurrent state name
 workflowItem.currentState.isEndStatestringIs the current state the final state?
 workflowItem.currentState.modifiedDatestringThe date the workflow item is modified
 workflowItem.availableTransitionsarrayCollection of available workflow states
 workflowItem.availableTransitions.idstringId of the available workflow state
 workflowItem.availableTransitions.namestringName of the available workflow state
 workflowItem.availableTransitions.isPersistablestringDefines if the workflow item is persistable
 blockedstringDefines if emails will be sent out. If blocked = true, then emails will not be sent.
    
404  No active approval with the given id exists.
 messagestringNo active approval with the given id exists.
 errorcodestringError code for the exception (30003)
    
400_IdRequired  Id is required.
 messagestringid is a required field.
 errorcodestringError code for the exception (10002)
    
400_HasDeadlineRequired  HasDeadline is required.
 messagestringHasDeadline is required.
 errorcodestringError code for the exception (10002)
    
400_DeadlineRequired  Deadline is required.
 messagestringDeadline is required.
 errorcodestringError code for the exception (10002)