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
idstringRequired. The ID of the workflow item to update.
NameTypeDescription
namestringRequired. Name of the approval item
descriptionstringRequired. Description for approval item
hasDeadlinestringRequired. Indicates if the approval item has a deadline
DeadlinestringRequired. 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.
StatusNameTypeDescription
200  200 OK.
 approvalItemIdstringThe ID of the approval item
 objectTypestringThe object type of the approval item
 objectIdstringThe unique ID of the object associated with the approval item
 namestringThe name of the approval item
 descriptionstringA description of the approval item
 workflowItemIdstringThe ID of the workflow item
 workflowStatestringWorkflow state of the approval item
 workflowTypestringType of workflow
 workflowNamestringName of the workflow
 deadlinearrayDeadline for the approval item
 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
 workflowItem.workflowItemIdstringThe ID of the workflow item
 workflowItem.workflowRoundstringWorkflow round
 workflowItem.typestringWorkflow type
 workflowItem.currentStateobjectCurrent state of the workflow
 workflowItem.currentState.stateIdstringThe ID of the current state of the workflow
 workflowItem.currentState.stateNamestringCurrent state name
 workflowItem.currentState.isEndStatestringIndicates whether the workflow item is in the final state
 workflowItem.currentState.modifiedDatestringThe date the workflow item is modified
 workflowItem.availableTransitionsarrayCollection of available workflow states
 workflowItem.availableTransitions.idstringThe ID 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 won’t be sent.
    
404  No active approval with the given id exists.
 messagestringNo active approval exists that contains the specified ID.
 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)