ramkisv | Posts: 2 Rest API to draw signature Wednesday, July 31, 2019 at 12:18am 0 votes Hi Team, Could you help me with API/JSON format to draw on a signature field . Appreciate your help. Thanks, Ramki July 31 Created January 21 Last Updated 5 years ago Last Reply 3 Replies 185 Views 2 Users 0 Likes 0 Links Duo_Liang | Posts: 3776 Reply to: Rest API to draw signature Wednesday, July 31, 2019 at 06:55am 0 votes Hey Ramki, Did you refer to the Capture Signature type? If so, below is an example for the approval JSON node: { "role": "Signer1", "id": "signature1", "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ] } As you can see, Capture Signature is with a subtype of "CAPTURE", this is how it's different from other signature types. Hope this could help! Duo Log in or register to post comments ramkisv | Posts: 2 Reply to: Rest API to draw signature Wednesday, July 31, 2019 at 05:42pm 0 votes Hi Duo Liang, Thanks fro the reply. I had done as suggested. But system is returning below exception "{"code":400,"messageKey":"error.validation.validateApproval.noRolesOnApproval","name":"Validation Error","message":"No role specified as part of this approval.","parameters":{"approvalDataName":"signature1"}}" I am passing below data in JSON { "roles": [ { "id": "Sender1", "type": "SIGNER", "signers": [ { "firstName": "Ramki", "lastName": "SV", "email": "[email protected]", "id": "Sender1" } ] } ], "documents": [ { "fields": [ { "value": "Ramki", "name": "first_name" }, { "value": SV", "name": "last_name" }, { "value": "Abbot street", "name": "address" }, { "value": "sydney", "name": "city" }, { "value": "2120", "name": "zip" }, { "value": "NSW", "name": "state" }, { "value": "AUSTRALIA", "name": "country" }, { "value": "4101412331", "name": "phone_number" }, { "value": "[email protected]", "name": "email" }, { "value": "KRMICT", "name": "company" }, { "value": "234", "name": "policy_number" } ], "name": "Sample Contract", "id": "contract", "extract": true } ], "approvals": [ { "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ], "role": "Signer1", "id": "signature1" } ], "name": "Sample", "type": "PACKAGE", "status": "SENT" } Could you please let me know if i am missing anything. Thanks, Ramki Log in or register to post comments Duo_Liang | Posts: 3776 Reply to: Rest API to draw signature Thursday, August 1, 2019 at 02:05am 0 votes Hey Ramki, I tweaked the payload a little bit for you, see below: { "status": "DRAFT", "roles": [ { "id": "Sender1", "type": "SIGNER", "signers": [ { "id": "Sender1", "firstName": "Ramki", "lastName": "SV", "email": "[email protected]" } ] } ], "documents": [ { "id": "contract", "extract": true, "fields": [ { "value": "Ramki", "name": "first_name" }, { "value": "SV", "name": "last_name" }, { "value": "Abbot street", "name": "address" }, { "value": "sydney", "name": "city" }, { "value": "2120", "name": "zip" }, { "value": "NSW", "name": "state" }, { "value": "AUSTRALIA", "name": "country" }, { "value": "4101412331", "name": "phone_number" }, { "value": "[email protected]", "name": "email" }, { "value": "KRMICT", "name": "company" }, { "value": "234", "name": "policy_number" } ], "name": "Sample Contract", "approvals": [ { "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ], "role": "Sender1", "id": "signature1" } ] } ], "type": "PACKAGE", "name": "Sample" } Only few points to notice: 1. "role" field in "approvals" node should map with role Id, which is "Sender1" in your case. 2."approvals" node should be host under the "documents" node. Our new API Specification site is up here, for your reference. Duo Log in or register to post comments
Duo_Liang | Posts: 3776 Reply to: Rest API to draw signature Wednesday, July 31, 2019 at 06:55am 0 votes Hey Ramki, Did you refer to the Capture Signature type? If so, below is an example for the approval JSON node: { "role": "Signer1", "id": "signature1", "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ] } As you can see, Capture Signature is with a subtype of "CAPTURE", this is how it's different from other signature types. Hope this could help! Duo Log in or register to post comments
ramkisv | Posts: 2 Reply to: Rest API to draw signature Wednesday, July 31, 2019 at 05:42pm 0 votes Hi Duo Liang, Thanks fro the reply. I had done as suggested. But system is returning below exception "{"code":400,"messageKey":"error.validation.validateApproval.noRolesOnApproval","name":"Validation Error","message":"No role specified as part of this approval.","parameters":{"approvalDataName":"signature1"}}" I am passing below data in JSON { "roles": [ { "id": "Sender1", "type": "SIGNER", "signers": [ { "firstName": "Ramki", "lastName": "SV", "email": "[email protected]", "id": "Sender1" } ] } ], "documents": [ { "fields": [ { "value": "Ramki", "name": "first_name" }, { "value": SV", "name": "last_name" }, { "value": "Abbot street", "name": "address" }, { "value": "sydney", "name": "city" }, { "value": "2120", "name": "zip" }, { "value": "NSW", "name": "state" }, { "value": "AUSTRALIA", "name": "country" }, { "value": "4101412331", "name": "phone_number" }, { "value": "[email protected]", "name": "email" }, { "value": "KRMICT", "name": "company" }, { "value": "234", "name": "policy_number" } ], "name": "Sample Contract", "id": "contract", "extract": true } ], "approvals": [ { "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ], "role": "Signer1", "id": "signature1" } ], "name": "Sample", "type": "PACKAGE", "status": "SENT" } Could you please let me know if i am missing anything. Thanks, Ramki Log in or register to post comments
Duo_Liang | Posts: 3776 Reply to: Rest API to draw signature Thursday, August 1, 2019 at 02:05am 0 votes Hey Ramki, I tweaked the payload a little bit for you, see below: { "status": "DRAFT", "roles": [ { "id": "Sender1", "type": "SIGNER", "signers": [ { "id": "Sender1", "firstName": "Ramki", "lastName": "SV", "email": "[email protected]" } ] } ], "documents": [ { "id": "contract", "extract": true, "fields": [ { "value": "Ramki", "name": "first_name" }, { "value": "SV", "name": "last_name" }, { "value": "Abbot street", "name": "address" }, { "value": "sydney", "name": "city" }, { "value": "2120", "name": "zip" }, { "value": "NSW", "name": "state" }, { "value": "AUSTRALIA", "name": "country" }, { "value": "4101412331", "name": "phone_number" }, { "value": "[email protected]", "name": "email" }, { "value": "KRMICT", "name": "company" }, { "value": "234", "name": "policy_number" } ], "name": "Sample Contract", "approvals": [ { "fields": [ { "type": "SIGNATURE", "subtype": "CAPTURE", "height": 37, "left": 211, "top": 140, "width": 165, "page": 0 } ], "role": "Sender1", "id": "signature1" } ] } ], "type": "PACKAGE", "name": "Sample" } Only few points to notice: 1. "role" field in "approvals" node should map with role Id, which is "Sender1" in your case. 2."approvals" node should be host under the "documents" node. Our new API Specification site is up here, for your reference. Duo Log in or register to post comments
Reply to: Rest API to draw signature
Wednesday, July 31, 2019 at 06:55amReply to: Rest API to draw signature
Wednesday, July 31, 2019 at 05:42pmReply to: Rest API to draw signature
Thursday, August 1, 2019 at 02:05am