Docusign RESTful Client Data Transfer Objects

Docusign RESTful services Data transfer classes

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

uk.co.techblue
ArtifactId

ArtifactId

docusign-restclient-dto
Last Version

Last Version

2.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

Docusign RESTful Client Data Transfer Objects
Docusign RESTful services Data transfer classes

Download docusign-restclient-dto

How to add to project

<!-- https://jarcasting.com/artifacts/uk.co.techblue/docusign-restclient-dto/ -->
<dependency>
    <groupId>uk.co.techblue</groupId>
    <artifactId>docusign-restclient-dto</artifactId>
    <version>2.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.techblue/docusign-restclient-dto/
implementation 'uk.co.techblue:docusign-restclient-dto:2.0.4'
// https://jarcasting.com/artifacts/uk.co.techblue/docusign-restclient-dto/
implementation ("uk.co.techblue:docusign-restclient-dto:2.0.4")
'uk.co.techblue:docusign-restclient-dto:jar:2.0.4'
<dependency org="uk.co.techblue" name="docusign-restclient-dto" rev="2.0.4">
  <artifact name="docusign-restclient-dto" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.techblue', module='docusign-restclient-dto', version='2.0.4')
)
libraryDependencies += "uk.co.techblue" % "docusign-restclient-dto" % "2.0.4"
[uk.co.techblue/docusign-restclient-dto "2.0.4"]

Dependencies

compile (3)

Group / Artifact Type Version
org.codehaus.jackson : jackson-mapper-asl jar 1.9.9
org.jboss.resteasy : jaxrs-api jar 2.3.5.Final
org.apache.commons : commons-lang3 jar 3.1

Project Modules

There are no modules declared in this project.

Docusign RESTful Client

DocuSign is an electronic signature and document workflow automation service provider that facilitates end user to electronically sign, manage and verify documents.

This project provides a java rest client api which consumes docusign RESTful services. Demo services can be viewed/executed @ iodocs

##Maven Following declaration can be used to add this library as a maven dependency:

<dependency>
    <groupId>uk.co.techblue</groupId>
    <artifactId>docusign-restclient-core</artifactId>
    <version>2.0.4</version>
</dependency>

##Usage

###Please create a developer account:

  1. Create a developer account from here.
  2. Log into developer sandbox througn link on the same page.
  3. Request an integrator key.

Now you have all necessary elements (username, passoword and an integrator key) to call docusign rest services.

###Let us look at an example on how to upload document using RESTful client:

  • Initialize DocuSignCredentials using the aquired authentication data.
DocuSignCredentials credentials = new DocuSignCredentials("<Docusign Username>", "<Password>", "<Integrator Key>");
  • Each Service instantiation takes service endpoint URI and credentials as parameters. RequestSignature Service encapsulates all flavours of signature request rest methods. Initialize it with docusign demo rest services endpoint.
String serviceURI = "https://demo.docusign.net/restapi/v2";
RequestSignatureService signatureService = new RequestSignatureService(serviceURI, credentials);
  • Create Document signature request DTO by setting necessary signer info.
DocumentSignatureRequest signatureRequest = new DocumentSignatureRequest();
signatureRequest.setEmailBlurb("Ajay, Please sign the document.");// Email body custom text
signatureRequest.setEmailSubject("Please sign attached document");
signatureRequest.setStatus(Status.sent);
  • Create a recipient collection with signer details and set it into signature request.
RecipientCollection recipientCollection = new RecipientCollection();
Signer signer = new Signer();
signer.setRecipientId("1");
signer.setEmail("[email protected]");
signer.setName("Ajay");
List<Signer> signerList = new ArrayList<Signer>();
signerList.add(signer);
recipientCollection.setSigners(signerList);

signatureRequest.setRecipients(recipientCollection);
  • Create document list configured with necessary document info and set it into signature request DTO.
List<Document> documentList = new ArrayList<Document>();
Document document = new Document();
document.setName("test-signature.txt");
document.setDocumentId("1");
document.setPath("/home/ajay/Documents/test-signature.txt");
documentList.add(document);
signatureRequest.setDocuments(documentList);
  • Send the signature request.
SignatureResponse response = signatureService.sendDocument(signatureRequest);

Signature response, among other useful information, will contain newly created envelope Id and URI.

response.getEnvelopeId();
response.getUri();
uk.co.techblue

Versions

Version
2.0.4
2.0.3