Andrei S.
Andrei S.

Reputation: 25

DocuSign API - Creating an envelope with a Document that has an Approve button

I am creating a draft envelope with a TXT document - which needs to display an Approve button to allow the signer to sign without placing a signature/initials on the document itself. Unfortunately I can't get the Approve button to show on the document, where have I gone wrong?

Here is the Request XML:

<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
    <ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
        <ns1:documents>
            <ns1:document>
                <ns1:name>TestDocument</ns1:name>
                <ns1:documentId>1</ns1:documentId>
                <ns1:documentBase64>&lt;Base64BytesHere&gt;</ns1:documentBase64>
                <ns1:fileExtension>txt</ns1:fileExtension>
            </ns1:document>
        </ns1:documents>
        <ns1:recipients>
            <ns1:signers>
                <ns1:signer>
                    <ns1:routingOrder>1</ns1:routingOrder>
                    <ns1:recipientId>1</ns1:recipientId>
                    <ns1:name>John Smith</ns1:name>
                    <ns1:email>[email protected]</ns1:email>
                </ns1:signer> 
            </ns1:signers>
        </ns1:recipients>
        <ns1:tabs>
            <ns1:approveTabs>
                <ns1:approve>
                    <anchorCaseSensitive />
                    <anchorHorizontalAlignment />
                    <anchorIgnoreIfNotPresent />
                    <anchorMatchWholeWord />
                    <anchorString />
                    <anchorUnits />
                    <anchorXOffset />
                    <anchorYOffset />
                    <conditionalParentLabel />
                    <conditionalParentValue />
                    <customTabId />
                    <documentId>1</documentId>
                    <mergeField />
                    <pageNumber>1</pageNumber>
                    <recipientId>1</recipientId>
                    <tabId />
                    <tabOrder />
                    <templateLocked />
                    <templateRequired />
                    <xPosition>100</xPosition>
                    <yPosition>100</yPosition>
                    <bold />
                    <font />
                    <fontColor />
                    <fontSize />
                    <italic />
                    <tabLabel />
                    <underline />
                    <buttonText />
                    <height>30</height>
                    <width>50</width>
                </ns1:approve>
            </ns1:approveTabs>
        </ns1:tabs>
</ns1:envelopeDefinition>

Essentially I am looking for something that looks like the attached screenshot

Upvotes: 0

Views: 211

Answers (1)

Praveen Reddy
Praveen Reddy

Reputation: 7383

The <tabs> node should be inside the <signer> node. The following example should work.

<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
    <ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
        <ns1:documents>
            <ns1:document>
                <ns1:name>TestDocument</ns1:name>
                <ns1:documentId>1</ns1:documentId>
                <ns1:fileExtension>txt</ns1:fileExtension>
                <ns1:documentBase64>RG9jIFRXTyBUV08gVFdP</ns1:documentBase64>
                <ns1:fileExtension>txt</ns1:fileExtension>
            </ns1:document>
        </ns1:documents>
        <ns1:recipients>
            <ns1:signers>
                <ns1:signer>
                    <ns1:routingOrder>1</ns1:routingOrder>
                    <ns1:recipientId>1</ns1:recipientId>
                    <ns1:name>John Smith</ns1:name>
                    <ns1:email>[email protected]</ns1:email>
                    <ns1:tabs>
                        <ns1:approveTabs>
                            <ns1:approve>                  
                                <documentId>1</documentId>
                                <pageNumber>1</pageNumber>
                                <xPosition>100</xPosition>
                                <yPosition>100</yPosition>
                                <height>30</height>
                                <width>50</width>
                            </ns1:approve>
                        </ns1:approveTabs>
                    </ns1:tabs>
                </ns1:signer> 
            </ns1:signers>
        </ns1:recipients>
</ns1:envelopeDefinition>

Upvotes: 1

Related Questions