Bulk Approvals

Use the Process Approvals resource to do bulk approvals. You can specify a collection of different Process Approvals requests to have them all executed in bulk.

Example usage

curl https://MyDomainName.my.salesforce.com/services/data/v68.0/process/approvals/ -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @bulk.json"

Example request body bulk.json file

{
  "requests" :
  [{
    "actionType" : "Approve",
    "contextId" : "04iD0000000Cw6r",
    "comments" : "approving an account"
    },{
    "actionType" : "Submit",
    "contextId" : "001D000000JRWBd",
    "nextApproverIds" : ["005D00000015rY9"],
    "comments" : "submitting an account"
    },{
    "actionType" : "Submit",
    "contextId" : "003D000000QBZ08",
    "comments" : "submitting a contact"
    }]
}

Example JSON response body


[ { 
  "actorIds" : null,
  "entityId" : "001D000000I8mImIAJ",
  "errors" : null,
  "instanceId" : "04gD0000000CvmZIAS",
  "instanceStatus" : "Approved",
  "newWorkitemIds" : [ ],
  "success" : true 
  }, {
  "actorIds" : null,
  "entityId" : "003D000000QBZ08IAH",
  "errors" : null,
  "instanceId" : "04gD0000000CvmeIAC",
  "instanceStatus" : "Approved",
  "newWorkitemIds" : [ ],
  "success" : true
  }, {
  "actorIds" : [ "005D00000015rY9IAI" ],
  "entityId" : "001D000000JRWBdIAP",
  "errors" : null,
  "instanceId" : "04gD0000000CvmfIAC",
  "instanceStatus" : "Pending",
  "newWorkitemIds" : [ "04iD0000000Cw6wIAC" ],
  "success" : true
} ]