Submit, Approve, or Reject Process Approvals

Submits a particular record both if its entity supports an approval process and the entity has a defined approval process. Records can be approved and rejected if the current user is an assigned approver. This resource is available in REST API version 30.0 and later.

When using a POST request to do bulk approvals, the requests that succeed are committed and the requests that don’t succeed send back an error.

URI: /services/data/vXX.X/process/approvals/

Formats: JSON, XML

HTTP methods: POST

Authentication: Authorization: Bearer token

Request parameters: None required

Request body

The request body contains an array of process requests that contain the following information:

NameTypeDescription
actionTypestringRepresents the kind of action to take: Submit, Approve, or Reject.
contextActorIdIDThe ID of the submitter who’s requesting the approval record.
contextIdIDThe ID of the record to submit for approval.
commentsstringThe comment to add to the history step associated with this request.
nextApproverIdsID[]If the process requires specification of the next approval, the ID of the user to be assigned the next request.
processDefinitionNameOrIdstringThe developer name or ID of the process definition.
skipEntryCriteriabooleanDetermines whether to evaluate the entry criteria for the process (true) or not (false) if the process definition name or ID isn’t null. If the process definition name or ID isn’t specified, this argument is ignored, and standard evaluation is followed based on process order. By default, the entry criteria isn’t skipped if it’s not set by this request.

Response body

The response contains an array of process results that contain the following information:

NameTypeDescription
actorIdsID[]IDs of the users who are currently assigned to this approval step.
entityIdIDThe object being processed.
errorsError[]The set of errors returned if the request failed.
instanceIdIDThe ID of the ProcessInstance associated with the object submitted for processing.
instanceStatusstringThe status of the current process instance (not an individual object but the entire process instance). The valid values are “Approved,” “Rejected,” “Removed,” or “Pending.”
newWorkItemIdsID[]Case-insensitive IDs that point to ProcessInstanceWorkitem items (the set of pending approval requests)
successbooleantrue if processing or approval completed successfully.