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.

NameTypeDescription
objectTypestringRequiredObject type for approval item
objectIdstringRequiredUnique Id for the object associated with the approval item
namestringRequiredName of the approval item
descriptionstringRequiredDescription of the approval item
workflowItemIdstringRequiredWorkflow item Id
DeadlinestringRequiredDeadline for approval item
StatusNameTypeDescription
201  Response includes the created approval item id and details about the approval and workflow items.
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.
409There is already an active approval for CMSAsset with id {id}.
messagestringThere is already an active approval for CMSAsset with id {id}.
errorcodestringError code for the exception (30004)
400_NameRequiredApproval Item Name is required.
messagestringApproval Item Name is required.
errorcodestringError code for the exception (10002)
400_ObjectTypeRequiredApproval Object Type is required.
messagestringApproval Object Type is required.
errorcodestringError code for the exception (10002)
400_ObjectIdRequiredObjectId is required.
messagestringObjectId is required.
errorcodestringError code for the exception (10002)
400_InvalidWorkflowTeamInvalid Workflow Team.
messagestringInvalid Workflow Team.
errorcodestringError code for the exception (10005)
400_NoWorkflowTeamNo 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.
messagestringNo 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.
errorcodestringError code for the exception (10000)
400_NoApproverNo Approver has been assigned to this default review team. Please go to Approvals Administration and add an Approver to the default review team.
messagestringNo Approver has been assigned to this default review team. Please go to Approvals Administration and add an Approver to the default review team.
errorcodestringError code for the exception (10000)