Database.com REST API Developer's Guide - Salesforce.com
Database.com REST API Developer's Guide - Salesforce.com
Database.com REST API Developer's Guide - Salesforce.com
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Using <strong>REST</strong> <strong>API</strong> ResourcesReject a RecordExample usagecurl https://na1.salesforce.<strong>com</strong>/services/data/v30.0/process/approvals/ -H "Authorization:Bearer token" -H "Content-Type: application/json" -d @approve.json"Example request body approve.json file{}"requests" : [{"actionType" : "Approve","contextId" : "04iD0000000Cw6SIAS","nextApproverIds" : ["005D00000015rY9"],"<strong>com</strong>ments" : "this record is approved"}]Example JSON response body[ {"actorIds" : null,"entityId" : "001D000000I8mImIAJ","errors" : null,"instanceId" : "04gD0000000CvmAIAS","instanceStatus" : "Approved","newWorkitemIds" : [ ],"success" : true} ]Reject a RecordUse the Process Approvals resource to reject a record or a collection of records. Each call takes an array of requests. The currentuser must be an assigned approver.Example usagecurl https://na1.salesforce.<strong>com</strong>/services/data/v30.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","<strong>com</strong>ments" : "This record is rejected."}]Example JSON response body[ {"actorIds" : null,"entityId" : "001D000000I8mImIAJ","errors" : null,49