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.
Name | Type | | Description |
---|
id | string | Required | Id of the workflow item to be updated |
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 | Deadline 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. |
Status | Name | Type | Description |
---|
200 | | | 200 OK. |
| approvalItemId | string | Id of approval item |
| objectType | string | Object type for the approval item |
| objectId | string | Unique Id of the object associated with the approval item |
| name | string | Name of approval item |
| description | string | Description of the approval item |
| workflowItemId | string | 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 | object | Comment counts |
| 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 | object | Workflow item object |
| workflowItem.workflowItemId | string | Workflow item Id |
| workflowItem.workflowRound | string | Workflow round |
| workflowItem.type | string | Workflow type |
| workflowItem.currentState | object | Current state of the workflow |
| workflowItem.currentState.stateId | string | Id of the current state |
| workflowItem.currentState.stateName | string | Current state name |
| workflowItem.currentState.isEndState | string | Is the current state 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 | 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 will not be sent. |
| | | |
404 | | | No active approval with the given id exists. |
| message | string | No active approval with the given id exists. |
| 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) |