Gotcha | Posts: 44

Simulating REST workflow using SOAPUI

0 votes
Hi, thanks Haris for your input, my next step is to simulate the workflow and working on a POC using SOAPUI ( a freeware I use to test REST services ). The workflow is straight forward: 1. Create a Package and Send the PDF . Read the Response PackageId 2. Retrieve the SIgningURL based on the PackageId I haven't had any luck with this simple call #1. Can you tell me what I am missing? In SoapUI I've create a new REST Project pointing to the URI https://sandbox.e-signlive.com/api/packages/ (Attached Screenshot of the Tool with the config) The JSON I'm sending is based on the sample I edited ( based on the Blog How to Create and Send your first package by Michael) - See the full string below submitted as a parameter "payload" The PDF is a sample PDF with some controls to show where the Signature should appear. (Attached) I'm using my apiKey ( edited out of this sample for obvious reasons) This is the request ( RAW) and response I am getting. REQUEST - where Authorization is the parameter I'm sending in the Header = "NxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA==" ( which comes from the apiKey from my Account in the Developer Account) POST https://sandbox.e-signlive.com/api/packages/ HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: multipart/form-data; boundary="----=_Part_7_1054765195.1460397781533" MIME-Version: 1.0 Authorization: NxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA== Content-Length: 27678 Host: sandbox.e-signlive.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) RESPONSE: HTTP/1.1 401 Unauthorized Server: nginx Date: Mon, 11 Apr 2016 18:03:30 GMT Content-Type: application/json Content-Length: 165 Connection: keep-alive X-Powered-By: Undertow 1 {"technical":null,"entity":null,"packageId":null,"messageKey":"error.unauthorised.noSession","message":"Failed to retrieve Session","code":401,"name":"Unauthorized"} The payload is the following ( I changed the emails of the 2 signers): {"roles":[{"locked":false,"emailMessage":{"content":"JSON Sample email"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"Id: SIgner 1 CW","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"Technicost Inc","firstName":"CYRIL","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"Lead Architect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"SenderName - CYRIL"},{"locked":false,"emailMessage":{"content":""},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"id: Signer2 LW","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER 2 FNAME","lastName":"SIGNER_LAST_NAME 2","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"Signer","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Signer"}],"documents":[{"approvals":[{"role":"Signer","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":175,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""},{"role":"Sender","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":550,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""}],"name":"YOUR_FILE_NAME"}],"name":"Test Package REST","type":"PACKAGE","language":"en","emailMessage":"","description":"New Package","autoComplete":true,"status":"SENT"} I've attached the screenshot of the SOAPUI set up. Can you tell me what I am missing? Thanks

Approved Answer
harishaidary | Posts: 1812

Reply to: Simulating REST workflow using SOAPUI

0 votes
I've had a go on my side and the issue seems to be with the name convention in your PDF textfields as per the error response you are getting. Everything with your JSON payload seems fine since I was able to create and send a package with it after fixing your PDF form fields. I attached the updated PDF below. Here are the changes I made to your PDF textfields: [Signer1.Capture1.Label1.YourLastName] to [Signer1.Capture1.label1.Name] [SignerId2.Capture1.Date] to [SignerId2.Capture1.label1.Date] YourLastName is not a valid eSignLive bound field. You can only have Name, Title, or Date (http://docs.e-signlive.com/doku.php?id=esl:e-signlive_guide-working_with_documents#document_extraction) . A bound field is one whose value is automatically assigned by the system at the moment of signing. As for grabbing the input of textfields, this can only be done through the audit trail. To grab the audit trail, you make a GET request to: https://sandbox.e-signlive.com/api/packages/{packageId}/audit

harishaidary | Posts: 1812

Reply to: Simulating REST workflow using SOAPUI

0 votes
Hey Cyril, Can you try adding "Basic" in your authorization header (e.g. "Basic API_KEY") and see if you can make a request to eSignLive? Also, the role id can only one alphanumeric word with underscores or hyphens (e.g. Signer1, Signer, Signer_1, etc.)

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
Hi Haris, Ok adding "Basic" seems to work and changing the id for the roles. However, I'm getting another type of error poiting to the JSON i'm passing Is there a way to debug and find out the source of the error? This is the JSON i'm sending {"roles":[{"locked":false,"emailMessage":{"content":"JSON Sample email"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId1","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"Technicost Inc","firstName":"CYRIL","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"Lead Architect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"SenderName - CYRIL"},{"locked":false,"emailMessage":{"content":""},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId2","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER 2 FNAME","lastName":"SIGNER_LAST_NAME 2","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"Signer","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Signer"}],"documents":[{"approvals":[{"role":"Signer","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":175,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""},{"role":"Sender","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":550,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""}],"name":"YOUR_FILE_NAME"}],"name":"Test_Package_REST","type":"PACKAGE","language":"en","emailMessage":"","description":"New Package","autoComplete":true,"status":"SENT"} The error I'm getting the following RAW JSON... but it is hard to read as the string is encoded in the "technical" node. Is there an easy way to know where the "unexpected character" is from? { "technical": "Unexpected character ('=' (code 61)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: {\"roles\":[{\"locked\":false,\"emailMessage\":{\"content\":\"JSON Sample email\"},\"a=\r\nttachmentRequirements\":[],\"reassign\":false,\"specialTypes\":[],\"id\":\"SignerId=\r\n1\",\"data\":null,\"type\":\"SIGNER\",\"index\":0,\"signers\":[{\"auth\":{\"challenges\":[=\r\n],\"scheme\":\"NONE\"},\"company\":\"Technicost Inc\",\"firstName\":\"CYRIL\",\"lastName=\r\n\":\"W.\",\"phone\":\"\",\"email\":\"[email protected]\",\"knowledgeBasedAuthentica=\r\ntion\":null,\"language\":\"en\",\"title\":\"Lead Architect\",\"external\":null,\"profes=\r\nsionalIdentityFields\":[],\"userCustomFields\":[],\"delivery\":{\"email\":true,\"pr=\r\novider\":false,\"download\":true},\"group\":null,\"signature\":null,\"address\":null=\r\n,\"data\":null,\"name\":\"\",\"specialTypes\":[]}],\"name\":\"SenderName - CYRIL\"},{\"l=\r\nocked\":false,\"emailMessage\":{\"content\":\"\"},\"attachmentRequirements\":[],\"rea=\r\nssign\":false,\"specialTypes\":[],\"id\":\"SignerId2\",\"data\":null,\"type\":\"SIGNER\"=\r\n,\"index\":0,\"signers\":[{\"auth\":{\"challenges\":[],\"scheme\":\"NONE\"},\"company\":\"=\r\n\",\"firstName\":\"SIGNER 2 FNAME\",\"lastName\":\"SIGNER_LAST_NAME 2\",\"phone\":\"\",\"=\r\nemail\":\"[email protected]\",\"knowledgeBasedAuthentication\":null,\"language\":=\r\n\"en\",\"title\":\"\",\"external\":null,\"professionalIdentityFields\":[],\"userCustom=\r\nFields\":[],\"delivery\":{\"email\":false,\"provider\":false,\"download\":false},\"gr=\r\noup\":null,\"id\":\"Signer\",\"signature\":null,\"address\":null,\"data\":null,\"name\":=\r\n\"\",\"specialTypes\":[]}],\"name\":\"Signer\"}],\"documents\":[{\"approvals\":[{\"role\"=\r\n:\"Signer\",\"signed\":null,\"accepted\":null,\"data\":null,\"fields\":[{\"page\":0,\"su=\r\nbtype\":\"FULLNAME\",\"width\":200,\"binding\":null,\"extract\":false,\"extractAnchor=\r\n\":null,\"left\":175,\"top\":165,\"validation\":null,\"height\":50,\"data\":null,\"type=\r\n\":\"SIGNATURE\",\"value\":\"\"}],\"name\":\"\"},{\"role\":\"Sender\",\"signed\":null,\"accep=\r\nted\":null,\"data\":null,\"fields\":[{\"page\":0,\"subtype\":\"FULLNAME\",\"width\":200,=\r\n\"binding\":null,\"extract\":false,\"extractAnchor\":null,\"left\":550,\"top\":165,\"v=\r\nalidation\":null,\"height\":50,\"data\":null,\"type\":\"SIGNATURE\",\"value\":\"\"}],\"na=\r\nme\":\"\"}],\"name\":\"YOUR_FILE_NAME\"}],\"name\":\"Test_Package_REST\",\"type\":\"PACKA=\r\nGE\",\"language\":\"en\",\"emailMessage\":\"\",\"description\":\"New Package\",\"autoComp=\r\nlete\":true,\"status\":\"SENT\"}; line: 1, column: 233] (through reference chain: com.silanis.esl.api.model.Package[\"roles\"]->com.silanis.esl.api.model.Role[\"signers\"]->com.silanis.esl.api.model.Signer[\"auth\"]->com.silanis.esl.api.model.auth.Auth[\"challenges\"])", "entity": null, "packageId": null, "messageKey": "error.validation.invalidJson", "message": "Invalid JSON.", "code": 400, "name": "Validation Error" }

harishaidary | Posts: 1812

Reply to: Simulating REST workflow using SOAPUI

0 votes
Unfortunately, you'll have to look through the JSON to determine where the error is. You could use a JSON online editor for readability. I also edited your JSON above. In the "approvals" object, the "role" object should be the role id. Using the PDF you provided, I was able to successfully send a package with the following JSON:
{
  "roles": [
    {
      "locked": false,
      "emailMessage": {
        "content": "JSONSampleemail"
      },
      "attachmentRequirements": [],
      "reassign": false,
      "specialTypes": [],
      "id": "SignerId1",
      "data": null,
      "type": "SIGNER",
      "index": 0,
      "signers": [
        {
          "auth": {
            "challenges": [],
            "scheme": "NONE"
          },
          "company": "TechnicostInc",
          "firstName": "CYRIL",
          "lastName": "W.",
          "phone": "",
          "email": "[email protected]",
          "knowledgeBasedAuthentication": null,
          "language": "en",
          "title": "LeadArchitect",
          "external": null,
          "professionalIdentityFields": [],
          "userCustomFields": [],
          "delivery": {
            "email": true,
            "provider": false,
            "download": true
          },
          "group": null,
          "signature": null,
          "address": null,
          "data": null,
          "name": "",
          "specialTypes": []
        }
      ],
      "name": "SenderName–CYRIL"
    },
    {
      "locked": false,
      "emailMessage": {
        "content": ""
      },
      "attachmentRequirements": [],
      "reassign": false,
      "specialTypes": [],
      "id": "SignerId2",
      "data": null,
      "type": "SIGNER",
      "index": 0,
      "signers": [
        {
          "auth": {
            "challenges": [],
            "scheme": "NONE"
          },
          "company": "",
          "firstName": "SIGNER2FNAME",
          "lastName": "SIGNER_LAST_NAME2",
          "phone": "",
          "email": "[email protected]",
          "knowledgeBasedAuthentication": null,
          "language": "en",
          "title": "",
          "external": null,
          "professionalIdentityFields": [],
          "userCustomFields": [],
          "delivery": {
            "email": false,
            "provider": false,
            "download": false
          },
          "group": null,
          "id": "Signer",
          "signature": null,
          "address": null,
          "data": null,
          "name": "",
          "specialTypes": []
        }
      ],
      "name": "Signer"
    }
  ],
  "documents": [
    {
      "approvals": [
        {
          "role": "SignerId1",
          "signed": null,
          "accepted": null,
          "data": null,
          "fields": [
            {
              "page": 0,
              "subtype": "FULLNAME",
              "width": 200,
              "binding": null,
              "extract": false,
              "extractAnchor": null,
              "left": 175,
              "top": 165,
              "validation": null,
              "height": 50,
              "data": null,
              "type": "SIGNATURE",
              "value": ""
            }
          ],
          "name": ""
        },
        {
          "role": "SignerId2",
          "signed": null,
          "accepted": null,
          "data": null,
          "fields": [
            {
              "page": 0,
              "subtype": "FULLNAME",
              "width": 200,
              "binding": null,
              "extract": false,
              "extractAnchor": null,
              "left": 550,
              "top": 165,
              "validation": null,
              "height": 50,
              "data": null,
              "type": "SIGNATURE",
              "value": ""
            }
          ],
          "name": ""
        }
      ],
      "name": "YOUR_FILE_NAME"
    }
  ],
  "name": "Test_Package_REST",
  "type": "PACKAGE",
  "language": "en",
  "emailMessage": "",
  "description": "NewPackage",
  "autoComplete": true,
  "status": "SENT"
}

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
Haris, I may have rushed into going straight to the samples and learning by examples... but I'm obviously missing some important specs to help me understand what I'm sending. So I'd like to step back a little and make sure I understand the workflow and structures I'm sending to you in the form of the JSON). The sequence diagram for the SDK shows there are 3 requests (Create Document Package, Add documents, Start Session ) before the Package is created vs the blog which explains the Create and Send Package , it is all done in one single WebS call. Can you confirm that in the REST, we can indeed send all info in the JSON , Upload the binary PDF in one call? Where do I get more detailed information about the JSON schema and what each node represent ( the type and values). I noticed based on the sample you edited that you removed all the spaces... I'm guessing it makes sense for nodes which represent ID ( or keys/codes ). However, I ALSO noticed you removed the spaces for literals or descriptive ( example Email Message ). I think it will help me understand your structure for sending package and the inter-dependencies between the various sections of the JSON instead of guessing from the samples. You mentioned you have edited the approvals and role nodes with the proper role id . COmparing the nodes I now realized the role => id are equivalent and represent the ID . Again i think if you can point me to the docs which explains the different sections to define the "roles", "approvals", "signers".. I'm starting to see a clearer picture based on the samples, but having the pointer which defines the whole structure will help me avoid silly mistakes. Some of the questions I have : - "roles" seems mandatory and needs to be defined with all signers referenced in the "documents", right? - within "roles" what are "specialTypes" ? - within "roles" what are "attachmentRequirements" - the type, format, array? - within "roles" what are signers - it seems like an array is it 1 to 1 for each "role" - in "documents" what are approvals refer to - is it the signers defined in "roles" - this is the reason why documents.approvals.role = roles.id? - wihtin the "Root", there is an emailMessage - is it the same as the email within each roles/signers? etc.. and so many more questions In Summary, Would you have a more explicit documentation which explains the possible input and output which are used in the JSON for the REST API. Neither the latter nor the blog examples does not go in detail on what the JSON input/output. In the mean time, I'll continue to proceed with the T & E using the 2 blogs (CreateAndSend , CheckPackageStatusAmdDownload) which I'm using to create my POC. Thanks

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
I've used the JSON you provided and removed all the spacings and submitted through SOAPUI, but is still getting errors. Can you tell me which tool you are using to POST these samples? Can you reproduce the test with SOAPUI and let me know if you are successful? Note: I've done all my POC and Testing with this independent tool to any new integrations to REST or SOAP services. Normally, all JSON or XML payloads are automatically encoded when submitted via this tool... However, I've also seen Vendors which encode their payload, which I then have to decode ... I'm not sure if this is the case here but in this test I'm sending the JSON exactly as is ( below in the blockquote), I noticed also in your response, the JSON has some escape chars - which may be normal - but making it unreadable without some alterations to the response . WOuld you have some tips on how you debug those cases? Below is the JSON i used, with the setup i sent you yesterday through SOAP UI
{"roles":[{"locked":false,"emailMessage":{"content":"JSONSampleemail"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId1","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"TechnicostInc","firstName":"CYRIL","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"LeadArchitect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"SenderName–CYRIL"},{"locked":false,"emailMessage":{"content":""},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId2","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER2FNAME","lastName":"SIGNER_LAST_NAME2","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"Signer","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Signer"}],"documents":[{"approvals":[{"role":"SignerId1","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":175,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""},{"role":"SignerId2","signed":null,"accepted":null,"data":null,"fields":[{"page":0,"subtype":"FULLNAME","width":200,"binding":null,"extract":false,"extractAnchor":null,"left":550,"top":165,"validation":null,"height":50,"data":null,"type":"SIGNATURE","value":""}],"name":""}],"name":"YOUR_FILE_NAME"}],"name":"Test_Package_REST","type":"PACKAGE","language":"en","emailMessage":"","description":"NewPackage","autoComplete":true,"status":"SENT"}
The response I get in RAW format:
{ "entity": null, "technical": "Unexpected character ('=' (code 61)): was expecting comma to separate OBJECT entries\n at [Source: {\"roles\":[{\"locked\":false,\"emailMessage\":{\"content\":\"JSONSampleemail\"},\"att=\r\nachmentRequirements\":[],\"reassign\":false,\"specialTypes\":[],\"id\":\"SignerId1\"=\r\n,\"data\":null,\"type\":\"SIGNER\",\"index\":0,\"signers\":[{\"auth\":{\"challenges\":[],=\r\n\"scheme\":\"NONE\"},\"company\":\"TechnicostInc\",\"firstName\":\"CYRIL\",\"lastName\":\"=\r\nW.\",\"phone\":\"\",\"email\":\"[email protected]\",\"knowledgeBasedAuthenticatio=\r\nn\":null,\"language\":\"en\",\"title\":\"LeadArchitect\",\"external\":null,\"profession=\r\nalIdentityFields\":[],\"userCustomFields\":[],\"delivery\":{\"email\":true,\"provid=\r\ner\":false,\"download\":true},\"group\":null,\"signature\":null,\"address\":null,\"da=\r\nta\":null,\"name\":\"\",\"specialTypes\":[]}],\"name\":\"SenderName=96CYRIL\"},{\"locke=\r\nd\":false,\"emailMessage\":{\"content\":\"\"},\"attachmentRequirements\":[],\"reassig=\r\nn\":false,\"specialTypes\":[],\"id\":\"SignerId2\",\"data\":null,\"type\":\"SIGNER\",\"in=\r\ndex\":0,\"signers\":[{\"auth\":{\"challenges\":[],\"scheme\":\"NONE\"},\"company\":\"\",\"f=\r\nirstName\":\"SIGNER2FNAME\",\"lastName\":\"SIGNER_LAST_NAME2\",\"phone\":\"\",\"email\":=\r\n\"[email protected]\",\"knowledgeBasedAuthentication\":null,\"language\":\"en\",\"t=\r\nitle\":\"\",\"external\":null,\"professionalIdentityFields\":[],\"userCustomFields\"=\r\n:[],\"delivery\":{\"email\":false,\"provider\":false,\"download\":false},\"group\":nu=\r\nll,\"id\":\"Signer\",\"signature\":null,\"address\":null,\"data\":null,\"name\":\"\",\"spe=\r\ncialTypes\":[]}],\"name\":\"Signer\"}],\"documents\":[{\"approvals\":[{\"role\":\"Signe=\r\nrId1\",\"signed\":null,\"accepted\":null,\"data\":null,\"fields\":[{\"page\":0,\"subtyp=\r\ne\":\"FULLNAME\",\"width\":200,\"binding\":null,\"extract\":false,\"extractAnchor\":nu=\r\nll,\"left\":175,\"top\":165,\"validation\":null,\"height\":50,\"data\":null,\"type\":\"S=\r\nIGNATURE\",\"value\":\"\"}],\"name\":\"\"},{\"role\":\"SignerId2\",\"signed\":null,\"accept=\r\ned\":null,\"data\":null,\"fields\":[{\"page\":0,\"subtype\":\"FULLNAME\",\"width\":200,\"=\r\nbinding\":null,\"extract\":false,\"extractAnchor\":null,\"left\":550,\"top\":165,\"va=\r\nlidation\":null,\"height\":50,\"data\":null,\"type\":\"SIGNATURE\",\"value\":\"\"}],\"nam=\r\ne\":\"\"}],\"name\":\"YOUR_FILE_NAME\"}],\"name\":\"Test_Package_REST\",\"type\":\"PACKAG=\r\nE\",\"language\":\"en\",\"emailMessage\":\"\",\"description\":\"NewPackage\",\"autoComple=\r\nte\":true,\"status\":\"SENT\"}; line: 1, column: 155] (through reference chain: com.silanis.esl.api.model.Package[\"roles\"])", "packageId": null, "messageKey": "error.validation.invalidJson", "message": "Invalid JSON.", "code": 400, "name": "Validation Error" }

harishaidary | Posts: 1812

Reply to: Simulating REST workflow using SOAPUI

0 votes
I'm gonna try to answer all your questions in bullet points. Let me know if I miss anything :)
  • Yes, you can create a package, upload a document, and send your package all in one call, as per the blog ( https://www.esignlive.com/blog/e-signlive-for-new-users-how-to-create-and-send-your-first-package-rest-api/ )
  • You can find the API schema here: http://docs.e-signlive.com/10.0/schema/index.html . Though I removed the spaces from your role id, I believe the spaces removed for your email message, for example, was unintentional. I used an online JSON editor (http://www.jsoneditoronline.org/) and I think maybe it trimmed the spaces.
  • “roles” is indeed mandatory. The roles object is where you define your signer(s) properties. Then, you use the “id” in “roles” to add approvals (signatures) in “documents” > “approvals”.
  • I am not sure what “specialTypes” is as I have not used it before nor has it come up. I will look into this and get back to you.
  • “attachmentRequirements” is when you want to request your signer(s) to upload an attachment after signing the documents (e.g. a copy of a driver’s license). More info on this here: https://www.esignlive.com/blog/esignlive-how-to-requesting-attachments/
  • “signers” is where you define your signer information: first name, last name, email, etc. The three that I listed are mandatory to send a package.
  • “approvals” are the signatures you want to add on your documents. To add an approval (signature), you will need to set the “role” in “approvals” to the role id and declare the fields accordingly.
  • Yes, the same email message gets sent to every signer. Email messages are on a package level and not on a signer level.
  • We are currently working on updating our documentation. It is a high priority for us and you will see some changes very soon
  • I suggest changing the package status from SENT to DRAFT. This way, you can inspect the package before sending it.
  • I’m not very familiar with SOAPUI. eSignLive doesn’t support SOAP. I am using POSTMAN to make REST calls to eSignLive. You can get it here: https://www.getpostman.com/
  • You could use a word editor to remove all the escape chars and use the JSON editor to format it for you
  • When building your JSON, make sure you use straight quotation marks and not curly or italic ones otherwise it will not work. I noticed in a few places in your JSON you had curly quotation marks. Namely in the role ids. I was able to create a package after making those changes in the latest JSON you posted.

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
I've always used the same JSON Editor and this is why I'm certain the JSON is properly formatted. After some unsuccessful attempts, I've concluded that SOAPUI ( which also supports testing RESTful services) somehow is creating problems when I've been succcessful in the past calling similar RESTful services with other 3rd party vendors. So now I'm using the tool you suggested POSTMAN and was able to submit the same payload. At this point, at least I can move forward. Now I'm trying to submit a Package and Upload the PDF . My goal is to have the PDF Uploaded and Emails sent In the sample PDF, I've created some fields and named the 2 signature fields according to your nomenclature for DOcument Extract. Can you tell me what I am doing wrong because I am getting errors. My JSON payload is:
{"settings":{"ceremony":{"events":{"complete":{"dialog":true,"redirect":"https://www.google.ca/search?q=beaches&biw=1680&bih=905&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwist6LBp47MAhXmkoMKHfrpB3wQsAQIOQ"}},"inPerson":true,"declineButton":true,"declineReasons":["Reason 1","Reason 2","No Reason"],"disableDeclineOther":false,"disableDownloadForUncompletedPackage":false,"disableFirstInPersonAffidavit":true,"disableInPersonAffidavit":false,"disableOptOutOther":false,"disableSecondInPersonAffidavit":true,"documentToolbarOptions":{"downloadButton":true},"handOver":{"title":"You will be redirected to Google homepage","href":"http://www.google.com","text":"Exit to site"},"hideCaptureText":false,"hideLanguageDropdown":true,"hidePackageOwnerInPerson":true,"hideWatermark":true,"maxAuthFailsAllowed":3,"optOutButton":true,"optOutReasons":["Reason 1","Reason 2"],"style":null,"layout":{"footer":{},"iframe":true,"navigator":true,"brandingBar":{"logo":{"src":"http://www.logo-maker.net/images/common/company-logo8.gif","link":""}},"header":{"feedback":true,"globalActions":{"confirm":true,"download":false,"hideEvidenceSummary":false,"saveAsLayout":false},"titleBar":{"title":true,"progressBar":true},"breadcrumbs":false,"globalNavigation":false,"sessionBar":true}}}},"roles":[{"locked":false,"emailMessage":{"content":"roles1.emailMessage.content 1 JSON Sample email"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"Signer1","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"Technicost Inc","firstName":"Roles.Signer 1 FName","lastName":"W.","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"Lead Architect","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":true,"provider":false,"download":true},"group":null,"signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"roles1.name – CYRIL"},{"locked":false,"emailMessage":{"content":"roles2.emailMessage.content 2"},"attachmentRequirements":[],"reassign":false,"specialTypes":[],"id":"SignerId2","data":null,"type":"SIGNER","index":0,"signers":[{"auth":{"challenges":[],"scheme":"NONE"},"company":"","firstName":"SIGNER2 First Name","lastName":"Signer 2 Last Name","phone":"","email":"[email protected]","knowledgeBasedAuthentication":null,"language":"en","title":"","external":null,"professionalIdentityFields":[],"userCustomFields":[],"delivery":{"email":false,"provider":false,"download":false},"group":null,"id":"SignerId2","signature":null,"address":null,"data":null,"name":"","specialTypes":[]}],"name":"Role.Signer 2 Name"}],"documents":[{"approvals":[],"extract":true,"name":"ESLDocumentWithFormFieldsWithTwoSignatures"}],"name":"root Package Name","type":"PACKAGE","language":"en","emailMessage":"","description":"root description","autoComplete":true,"status":"SENT"}
The Response is:
{
  "messageKey": "error.validation.extractingFields",
  "technical": "Package: 30ab2f13-ee8b-44af-82a9-43e2c5dd53c4 Document: fec3e7c2686c74e9, Errors: [Unable to interpret field type., Unable to interpret approval name.]",
  "packageId": null,
  "entity": null,
  "message": "Unable to extract PDF fields from this document.",
  "code": 400,
  "name": "Validation Error"
}
The PDF is Attached: Besides the 2 Signature Fields, I have some other Text Fields I've added as a test to see if I can have Text Fields for editing when it is being submitted at Signature Ceremony. I'd like to see if I can capture last minute input and then save the results back to my Application , is this possible? Would you mind taking a look at the PDF and JSON , and point out what I am doing wrong?

Karan | Posts: 4

Reply to: Simulating REST workflow using SOAPUI

0 votes
Hello Gotcha, I am trying to create a package and upload a document from SoapUi. I'm having some issues, How to test from SoapUi. Could you please attach a screenshot how to test from soapUI. thank you! Karan

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
I 've had trouble testing it with SOAPUI and i wasnt sure why ( didnt bother investigating ) so I used the same POSTMAN extension suggested by Haris. If you are familiar with SOAPUI , POSTMAN is easy to understand as well... So for this POC, I had to use POSTMAN due to lack of time to simulate the calls .

Karan | Posts: 4

Reply to: Simulating REST workflow using SOAPUI

0 votes
Hello Harris/Gotcha, I am having some Issues while sending a JSONRequest and a PDF file in a single webservice call. First call-- I can able to create a package. Second call --I can able to upload a document by giving the above packageId as a reference. My questions is, can we create a package with JSON Request and a upload a document PDF file in a single Rest webservice call. Please advise me on how to proceed on this. Note: I tried using SoapUi and RestClient also.

Gotcha | Posts: 44

Reply to: Simulating REST workflow using SOAPUI

0 votes
Quick answer ... yes you can Create and Send the package at the same time. Check Harris's blog where he showed how to do both.... I would suggest to use his example and build on top of his JSON to add your required elements. Sorry It's been a while I worked on this POC and do not have the sample snippet handy... but if you check his sample JSON above, it should give you an idea.

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off