How to send multiple document using API when creating the package
Friday, August 3, 2018 at 10:41pm
0
votes
Hi,
How to send multiple document using API when creating the package?
Thanks in Adv.
August 3Created
January 21Last Updated
a year agoLast Reply
4Replies
113Views
3Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 02:41am
0
votes
Hi Kartik,
Yes, with OneSpan Sign, you have the capability to create a package with multiple documents. Below is the API info and example request payload for you:
HTTP Request
POST /api/packages
HTTP Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: Basic api_key
Attachment shows you how to organize the http body.
And this is an example for creating a package with two documents and two signers:
{
"documents":[
{
"approvals":[
{
"id":"Signature1",
"role":"Role1",
"fields":[
{
"page":0,
"top":300,
"subtype":"FULLNAME",
"optional":true,
"height":50,
"left":100,
"width":200,
"type":"SIGNATURE",
"name":"ExampleSignature"
}
],
"name":""
}
],
"id":"document1",
"name":"Test Document1"
},
{
"approvals":[
{
"id":"Signature2",
"role":"Role2",
"fields":[
{
"page":0,
"top":300,
"subtype":"FULLNAME",
"height":50,
"left":100,
"width":200,
"type":"SIGNATURE",
"name":"ExampleSignature"
}
],
"name":""
}
],
"id":"document2",
"name":"Test Document2"
}
],
"status":"SENT",
"type":"PACKAGE",
"roles":[
{
"id":"Role1",
"type":"SIGNER",
"signers":[
{
"id":"Signer1",
"email":"[email protected]",
"firstName":"1.firstname",
"lastName":"1.lastname"
}
],
"name":"Role1"
},
{
"id":"Role2",
"type":"SIGNER",
"signers":[
{
"id":"Signer2",
"email":"[email protected]",
"firstName":"2.firstname",
"lastName":"2.lastname"
}
],
"name":"Role2"
}
],
"name":"Example Package with multiple documents"
}
Reply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 03:35am
0
votes
Thanks for the reply
I completely understand the json part.
But as per quick tutorial ,HttpClient is used for making multipartform request in c#.
I am using WebClient instead of HttpClient, another system.net library in c# and there is a concept of making boundry , but multiple file is not uploading with this library. getting 400 bad request.
if any help would be appreciated
Thanks in Adv..
Reply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 05:47am
0
votes
Hi Kartik,
The attachment is the C# code created for you. It's a sample code using WebClient and achieving uploading multiple documents when creating the package.
Duo
Reply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 02:41amReply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 03:35amReply to: How to send multiple document using API when creating the package
Saturday, August 4, 2018 at 05:47amReply to: How to send multiple document using API when creating the package
Friday, March 3, 2023 at 02:15amHi,
Can you share .net code with httpclient