POST /hub/v1/approvals-v2

Creates an approval item and an associated a workflow item. The response includes details of the approval and workflow items, including the current state and the transitions available based on the current user's roles.

JSON Parameters

Name Type Description
objectType String Required. Object type for approval item
objectId String Required. Unique Id for the object associated with the approval item
name String Required. Name of the approval item
description String Required. Description of the approval item
workflowItemId String Required. Workflow item Id
Deadline String Required. Deadline for approval item

Responses

Status Name Type Description
201     Response includes the created approval item id and details about the approval and workflow items.
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 won't be sent.
409 There is already an active approval for CMSAsset with id {id}.
message string There is already an active approval for CMSAsset with id {id}.
errorcode string Error code for the exception (30004)
400_NameRequired Approval Item Name is required.
message string Approval Item Name is required.
errorcode string Error code for the exception (10002)
400_ObjectTypeRequired Approval Object Type is required.
message string Approval Object Type is required.
errorcode string Error code for the exception (10002)
400_ObjectIdRequired ObjectId is required.
message string ObjectId is required.
errorcode string Error code for the exception (10002)
400_InvalidWorkflowTeam Invalid Workflow Team.
message string Invalid Workflow Team.
errorcode string Error code for the exception (10005)
400_NoWorkflowTeam No workflow team has been specified, and no default Two-Step Approvals workflow team has been created. Please create a Two-Step Approvals workflow team, or specify an existing workflow team. Then, try again.
message string No workflow team has been specified, and no default Two-Step Approvals workflow team has been created. Please create a Two-Step Approvals workflow team, or specify an existing workflow team. Then, try again.
errorcode string Error code for the exception (10000)
400_NoApprover No Approver has been assigned to this default review team. Please go to Approvals Administration and add an Approver to the default review team.
message string No Approver has been assigned to this default review team. Please go to Approvals Administration and add an Approver to the default review team.
errorcode string Error code for the exception (10000)