1
votes

I am trying to create a a draft envelope with a document and a recipient through DocuSign API Explorer using my DocuSign Developer Sandbox account.

Despite a SUCCESS response, the actual envelope contains neither the document or the recipient I included in the Request. Where am I going wrong?

Here is the Request XML:

<envelopeDefinition 
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://www.docusign.com/restapi">
    <documents>
        <documentBase64>&lt;Base64BytesHere&gt;</documentBase64>
    </documents>
    <emailSubject>Test from API Explorer</emailSubject>
    <recipients>
        <signers>
            <email>[email protected]</email>
            <name>John Smith</name>
        </signers>
    </recipients>
    <status>created</status>
</envelopeDefinition>

Here is the empty envelope screenshot

1

1 Answers

2
votes

You're missing some parameters for the document and recipient objects, for instance you need to add a documentId and documentName for the document in addition to the document bytes.

Here's what a full XML request should look like:

<envelopeDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
    <emailSubject>Test Subject</emailSubject>
    <documents>
      <document>
        <name>document.pdf</name>
        <documentId>1</documentId>
        <documentBase64>&lt;Base64BytesHere&gt;</documentBase64>
      </document>
    </documents>
    <recipients>
        <signers>
            <tabs>
                <signHereTabs>
                  <signHereTab>
                    <pageNumber>1</pageNumber>
                    <documentId>1</documentId>
                    <xPosition>100</xPosition>
                    <yPosition>100</yPosition>
                  </signHereTab>
                </signHereTabs>
            </tabs>
            <routingOrder>1</routingOrder>
            <recipientId>1</recipientId>
            <name>My Name</name>
            <email>[email protected]</email>
        </signers>
    </recipients>
    <status>created</status>
</envelopeDefinition>