Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Reject a Record

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

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

Example request body reject.json file

1{
2  "requests" : [{
3    "actionType" : "Reject",
4    "contextId" : "04iD0000000Cw6cIAC",
5    "comments" : "This record is rejected."}]
6}

Example JSON response body

1[ { 
2  "actorIds" : null,
3  "entityId" : "001D000000I8mImIAJ",
4  "errors" : null,
5  "instanceId" : "04gD0000000CvmFIAS",
6  "instanceStatus" : "Rejected",
7  "newWorkitemIds" : [ ],
8  "success" : true 
9} ]