Submit a Record for Approval
Use the Process Approvals resource to submit a record or a collection of records for approval. Each call
takes an array of requests.
- Example usage
-
curl https://MyDomainName.my.salesforce.com/services/data/v63.0/process/approvals/ -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @submit.json"
- Example request body submit.json file
-
In the following example, the record "001D000000I8mIm" is submitted for approval process "PTO_Request_Process" by skipping its entry criteria on behalf of submitter "005D00000015rZy."
{ "requests" : [{ "actionType": "Submit", "contextId": "001D000000I8mIm", "nextApproverIds": ["005D00000015rY9"], "comments":"this is a test", "contextActorId": "005D00000015rZy", "processDefinitionNameOrId" : "PTO_Request_Process", "skipEntryCriteria": "true"}] }
- Example JSON response body
-
[ { "actorIds" : [ "005D00000015rY9IAI" ], "entityId" : "001D000000I8mImIAJ", "errors" : null, "instanceId" : "04gD0000000Cvm5IAC", "instanceStatus" : "Pending", "newWorkitemIds" : [ "04iD0000000Cw6SIAS" ], "success" : true } ]