


atZone(ZoneId.systemDefault()).toLocalDate().format(formatter) Instant.ofEpochMilli(System.currentTimeMillis()) For example: Let's add a text tab to capture the envelope’s creation date: val formatter = DateTimeFormatter.ofPattern("dd MMMM yyyy")

which can be added via Tab class in the SDK. This diagram outlines the EnvelopeDefinition object structure:ĭocuSign provides a variety of commonly used tabs such as: text, checkbox, dropdown etc. Val envelopeDefinition = EnvelopeDefinition()ĮnvelopeDefinition.emailSubject = "DecoSignDemo"ĮpositeTemplates = listOf(compositeTemplate)Īn EnvelopeDefinition is the core object which combines the templates (actual files) and signers together. Val compositeTemplate = CompositeTemplate()ĬpositeTemplateId = "1"ĬrverTemplates = listOf(demoTemplate)ĬompositeTemplate.inlineTemplates = listOf(recipientsTemplate) RecipientsTemplate.recipients = recipientsĬreate CompositeTemplate using both InlineTemplate and ServerTemplate Val recipientsTemplate = InlineTemplate() ```KotlinĪssign the signers to the Recipients object. If there are two signers, the signer with smaller number will sign first. routingOrder defines the signing sequence. The recipientId is a unique string, you can use any string other The Signer object is the signer's configuration which includes their email, name, recipientId and routingOrder. SignerTab.signHereTabs = listOf(signHere) To determine the correct x and y position you can use the web portal UI. The SignHere object represents the location where a recipient has to sign the envelope. The TemplateId can be found in edit template page.ĭemoTemplate.templateId = "cd635318-aaad-4e63-ba2d-adb9edf06db3" A ServerTemplate represents a file you have uploaded to Docusign.
#Docusign pricing api how to#
Let’s start with an example to demonstrate how to create and send an envelope using the DocuSign SDK: Step one: Create EnvelopeDefinition
