Duo_Liang submitted March 20 2019

This sample code shows you how to use Apache Wink RestClient to make a POST (/api/packages) request creating a new package at OneSpan Sign.

 

The payload I used in this example was:

{"status":"SENT","description":"New Package","language":"en","roles":[{"id":"Role1","signers":[{"company":"OneSpan Sign","firstName":"1.firstname","lastName":"1.lastname","email":"[email protected]"}]},{"id":"Role2","signers":[{"company":"OneSpan Sign","firstName":"2.firstname","lastName":"2.lastname","email":"[email protected]"}]}],"autocomplete":true,"emailMessage":"","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"}],"name":"Example Package","type":"PACKAGE"}

 

Dependencies I used for the code was:

org.apache.wink

wink-common

1.4

 

org.apache.wink

wink-client

1.4

 

commons-io

commons-io

2.6

 

Rate this Code Share

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