Sunday, 28 April 2024

How to recall or cancel any sign request (if request is not completely signed by all signers)?

Using AYAN KAiZEN, businesses can digitally or electronically sign a contract or deal or any confidential document in a secured way. There is no need for the sales team to send any physical documents for signing, as it will take time and can delay the process. 

Signers can create/draw/upload a secure and verifiable signature, which can be used on any device to digitally sign or embed sign to a specific location on the documents.

Few Questions:

  • Is it possible to cancel a sign request once it is placed by requestor? 
  • Can we cancel the sign request if its status is not yet marked as completely signed?
  • Can we cancel a request if the request is signed by one of signers and pending for other signers to sign?
One word Answer: Yes, we can recall or cancel the sign request in all the above cases.

Few simple steps to recall any sign request:

Step 1: Assuming the sign request is already generated. Whenever a new signRequest is initiated (refer this blog), it generates a signRequestID in the response, which is required parameter to recall a sign request. Kindly store the signRequest ID in the response.

Sample HTTP Response for new sign request:
{
"FailRules": [],
"Data": {
"SignRequestId": "01HV6MEARQD3X8ZXXX5FR3YDB8",
"RequestNo": "KAiZEN-118"
}

} 

Step 2: In order to recall any signRequest, user need to make a secure HTTP Callout as per the below details:

HTTP Request Parameters
Paramters NameValue
Content-Typeapplication/json
MethodPOST
Endpointhttps://fa-kaizen-prod.azurewebsites.net/api/RecallSignRequest?code=RTa1A0GW5Yl92OF54-73lRqglLFCt_0pVcg86hWf1EjtAzFuNROcdA==
BodyJSON Body with parameters

Request Body Parameters
Paramters NameDescriptionRequired
signRequestIdUnique ID of the sign requestYes
appTokenUnique Code to initiate the requestYes
recallReasonReason for recall the requestNo
recalledByName of the person who initiated the recallYes


Sample HTTP Request:
HttpRequest request = new HttpRequest(); request.setEndpoint( << Initiate Sign Endpoint URL >> ); request.setMethod('POST'); request.setHeader('Content-Type', 'application/json'); request.setBody( << JSON Body as shown below >> ); request.setTimeout(120000);

Sample JSON Body:
{
"signRequestId": "<< unique id of sign request>>",
"appToken": "01HQMDX-YCP019-Z2P3SX-QPSB53-8B4A3F-BC40B8-B10908-FB2FF4-A",
"recallReason": "Request raised mistakenly",
"recalledBy": "Mohit Bansal"
}


Sample HTTP Response:
{
"FailRules": [],
"Data": true
}

Once the request is submitted, it will generate the different responses depending upon different scenarios:

  • Scenario 1: If the sign request is open or not completely signed, then request will successfully get cancelled with status as true.
  • Scenario 2: If the sign request is already signed, then it will display a error message in the response with the message "This request is already cancelled"

  • Scenario 3: If the sign request has invalid token, then it will display a error message in the response with the message "Invalid App Token"
  • Scenario 4: If the sign request has invalid id, then it will display a error message in the response with the message "No sign request found"

No comments:

Post a Comment