This simple example code shows how to use the Apex SDK to create and send a package.
For detailed steps, you can refer to this guidance:
https://developer.esignlive.com/guides/quick-start/creating-sending-package/
Rate this Code Share
OneSpan Introduces DigipassONE, Bringing a Unified Platform Approach to Authentication Modernization
A new authentication platform helps financial institutions support diverse customer authentication preferences while modernizing at their own pace Learn More
This simple example code shows how to use the Apex SDK to create and send a package.
For detailed steps, you can refer to this guidance:
https://developer.esignlive.com/guides/quick-start/creating-sending-package/
Comments
Reply to: Simple Create and Send Package (Apex SDK)
Thursday, October 22, 2020 at 05:00amHi,
I am using the code which you have written. But in my case, i am getting an error 'ESignLiveRESTAPIHelper.ESignLiveRestAPIHelperException: Error creating eSignLive package with documents: Illegal value for primitive' on below line -
sdk.createDocuments(packageId, document, doc);
Below is the response we are trying to deserialize -
{"status":"",
"description":"",
"id":"document1",
"external":null,
"extract":false,
"extractionTypes":[],
"tagged":false,
"approvals":[],
"signedHash":null,
"signerVerificationToken":null,
"pages":[{"id":"","left":0.0,"width":796.0,"height":1030.0,"top":0.0,"index":0,"version":0}],
"data":{"ese_document_texttag_extract_needed":"false"},
"index":1,
"fields":[],
"name":"Sample Contract",
"size":8534}
with class Document -
public class Document
{
public List<Approval> approvals;
public Data data;
public String description;
public External external;
public Boolean extract;
public List<Field> fields;
public String id;
public Integer index;
public String name;
public List<Page_x> pages;
public Integer size;
}
The issue is with the field data. In Document class , its mentioned as String but in reponse , its not string. Can you help in this case.
Thanks
Pranay