This API approves the approval request. This API accepts the ID of the approval request and comments as input parameters. Approval requests are approved in an asynchronous mode. When you submit approveRequest API, a batch job is submitted to approve the approval request. You will receive an email notification when the API is successfully executed. If the API fails for some reason, the entire process is rollbacked. 

You can only approve one approval request at a time. 


APISignature
approveRequestwebService static Boolean approveRequest(Id requestId, String comments)
Request Parameters
NameTypeRequired?Description

requestId

IDYesID of the approval request.
commentsStringYesComments to add to the approval request.
Response Parameter
NameTypeDescription
resultBooleanReturns true if the approval request is approved successfully.

Integration Details

Use the following information in your integrations with Apttus Intelligent Workflow Approvals API. Refer to Integrating Apttus with External Systems for information on how to get started.

API Prerequisites

None.

Response/Request XML

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:app="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
   <soapenv:Header>      
      <app:SessionHeader>
         <app:sessionId>00DR0000001nyVR!ARYAQNCIk5WB9S9PlmZzS2uecBjxnhB20ndYmyxseH1LEfStQi1cXAtXiDxEyd3kAbYrAXbpJmDZzVXGxrxxleE8Fmm6kqSm</app:sessionId>
      </app:SessionHeader>
      </soapenv:Header>

   <soapenv:Body>
      <app:approveRequest>
         <app:requestId>a0oR0000006cqc6</app:requestId>
         <app:comments>Approve</app:comments>
      </app:approveRequest>
   </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns="http://soap.sforce.com/schemas/class/Apttus_Approval/ApprovalsWebService">
   <soapenv:Body>
      <approveRequestResponse>
         <result>true</result>
      </approveRequestResponse>
   </soapenv:Body>
</soapenv:Envelope>
XML