Use the Process Approvals resource to reject a record or a collection of records. Each call takes an array of requests. The current user must be an assigned approver.
Example usage
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/process/approvals/ -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @reject.json"
Example request body reject.json file
{
"requests" : [{
"actionType" : "Reject",
"contextId" : "04iD0000000Cw6cIAC",
"comments" : "This record is rejected."}]
}
Example JSON response body
[ {
"actorIds" : null,
"entityId" : "001D000000I8mImIAJ",
"errors" : null,
"instanceId" : "04gD0000000CvmFIAS",
"instanceStatus" : "Rejected",
"newWorkitemIds" : [ ],
"success" : true
} ]