DocuSign API Explorer - 使用文档和收件人创建草稿信封

时间:2017-06-06 15:00:37

标签: docusignapi

我正在尝试使用DocuSign Developer Sandbox帐户通过DocuSign API Explorer创建包含文档和收件人的草稿信封。

尽管有SUCCESS响应,但实际信封中既不包含我在请求中包含的文档或收件人。我哪里错了?

这是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>nobody@nobody.com</email>
            <name>John Smith</name>
        </signers>
    </recipients>
    <status>created</status>
</envelopeDefinition>

Here is the empty envelope screenshot

1 个答案:

答案 0 :(得分:2)

您缺少文档和收件人对象的一些参数,例如,除文档字节外,您还需要为文档添加documentIddocumentName

以下是完整的XML请求:

<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@email.com</email>
        </signers>
    </recipients>
    <status>created</status>
</envelopeDefinition>