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
1curl https://MyDomainName.my.salesforce.com/services/data/v67.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."
1{
2"requests" : [{
3"actionType": "Submit",
4"contextId": "001D000000I8mIm",
5"nextApproverIds": ["005D00000015rY9"],
6"comments":"this is a test",
7"contextActorId": "005D00000015rZy",
8"processDefinitionNameOrId" : "PTO_Request_Process",
9"skipEntryCriteria": "true"}]
10}Example JSON response body
1[ {
2 "actorIds" : [ "005D00000015rY9IAI" ],
3 "entityId" : "001D000000I8mImIAJ",
4 "errors" : null,
5 "instanceId" : "04gD0000000Cvm5IAC",
6 "instanceStatus" : "Pending",
7 "newWorkitemIds" : [ "04iD0000000Cw6SIAS" ],
8 "success" : true } ]