Singatories
Saturday, October 17, 2020 at 04:38amHi,
when request is placed to OSS for signatory, do both sender and signer need to sign (or signing process will be completed if singer does the signature?)
Thank you!
Naresh
Hi,
when request is placed to OSS for signatory, do both sender and signer need to sign (or signing process will be completed if singer does the signature?)
Thank you!
Naresh
Reply to: Singatories
Saturday, October 17, 2020 at 07:30amHi Naresh,
Depending on how you designed the package, both could be possible - in order to complete a remote signing process, all parties (either sender or signer) be assigned signature(s) are required to sign based on the signing order you specified.
Also, if it's related to your previous post, do you mind sharing more about your use case and the goal you want to achieve?
Duo
Reply to: Hi Naresh, Depending on…
Saturday, October 17, 2020 at 09:30amHi Duo, thank you. I will post with details
Thank you
Naresh
Reply to: Singatories
Saturday, October 17, 2020 at 09:57amHi Duo,
do you have sample code for the following scenarios (.NET API). POC done with single doc and single signatory
1. Single doc with multiple signatory
2. mutiple docs with multiple signatory
Thanks
Naresh
Reply to: Singatories
Tuesday, October 20, 2020 at 04:30pmHi Naresh,
You can find the sample .NET REST code to create a single doc with multiple signatures in this quick start guide and this code share.
Based on that, below code snippet gives you an idea how to "create a package with mutiple docs with multiple signatory"
public void Execute()
{
string apiKey = "your_api_key";
string url = "https://sandbox.esignlive.com/api";
string jsonString = "{\"roles\":[{\"id\":\"Role1\",\"signers\":[{\"email\":\"[email protected]\",\"firstName\":\"1.firstname\",\"lastName\":\"1.lastname\",\"company\":\"OneSpan Sign\"}]},{\"id\":\"Role2\",\"signers\":[{\"email\":\"[email protected]\",\"firstName\":\"2.firstname\",\"lastName\":\"2.lastname\",\"company\":\"OneSpan Sign\"}]}],\"documents\":[{\"approvals\":[{\"role\":\"Role1\",\"fields\":[{\"page\":0,\"top\":100,\"subtype\":\"FULLNAME\",\"height\":50,\"left\":100,\"width\":200,\"type\":\"SIGNATURE\"}]},{\"role\":\"Role2\",\"fields\":[{\"page\":0,\"top\":300,\"subtype\":\"FULLNAME\",\"height\":50,\"left\":100,\"width\":200,\"type\":\"SIGNATURE\"}]}],\"name\":\"Test Document\"},{\"approvals\":[{\"role\":\"Role1\",\"fields\":[{\"page\":0,\"top\":100,\"subtype\":\"FULLNAME\",\"height\":50,\"left\":100,\"width\":200,\"type\":\"SIGNATURE\"}]},{\"role\":\"Role2\",\"fields\":[{\"page\":0,\"top\":300,\"subtype\":\"FULLNAME\",\"height\":50,\"left\":100,\"width\":200,\"type\":\"SIGNATURE\"}]}],\"name\":\"Test Document2\"}],\"name\":\"Example Package\",\"type\":\"PACKAGE\",\"language\":\"en\",\"emailMessage\":\"\",\"description\":\"New Package\",\"autocomplete\":true,\"status\":\"SENT\"}";
StringContent jsonContent = new StringContent(jsonString, Encoding.UTF8, "application/json");
byte[] fileByteArray = File.ReadAllBytes("your_file_path1");
ByteArrayContent content = new ByteArrayContent(fileByteArray);
content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
content.Headers.ContentDisposition.Name = "\"file\"";
byte[] fileByteArray2 = File.ReadAllBytes("your_file_path2");
ByteArrayContent content2 = new ByteArrayContent(fileByteArray2);
content2.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
content2.Headers.ContentDisposition.Name = "\"file\"";
MultipartFormDataContent form = new MultipartFormDataContent();
form.Add(content, "\"file\"", "\"Document1\"");
form.Add(content2, "\"file\"", "\"Document2\"");
form.Add(jsonContent, "\"payload\"");
HttpClient myClient = new HttpClient();
myClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", apiKey);
myClient.DefaultRequestHeaders.Add("Accept", "application/json");
var response = myClient.PostAsync(new Uri(url) + "/packages/", form).Result;
Debug.WriteLine(response.Content.ReadAsStringAsync().Result);
}
Two places to notice:
(1)build the JSON accordingly and add a node to "documents" array
(2)add binaries to MultipartFormDataContent in sequence, with the same formdata name "file". The order matches with the "documents" array in JSON.
Duo