2017-06-20 93 views
0

我想通过DocuSign API创建一个带有textCustomField的草稿信封,但是我无法使其工作,怀疑它是请求中textCustomField标签的位置 - 并需要一些帮助来指导我。以下是当前的请求XML:DocuSign API - 使用textCustomField创建信封

<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi"> 
    <ns1:emailSubject>Test</ns1:emailSubject> 
    <ns1:status>created</ns1:status> 
    <ns1:documents> 
     <ns1:document> 
      <ns1:name>TestDocument</ns1:name> 
      <ns1:documentId>1</ns1:documentId> 
      <ns1:documentBase64>U09XIElE==</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>70</xPosition> 
          <yPosition>120</yPosition> 
          <height>30</height> 
          <width>50</width> 
         </ns1:approve> 
        </ns1:approveTabs> 
        <ns1:declineTabs> 
         <ns1:decline> 
          <documentId>1</documentId> 
          <pageNumber>1</pageNumber> 
          <xPosition>130</xPosition> 
          <yPosition>120</yPosition> 
          <height>30</height> 
          <width>50</width> 
         </ns1:decline> 
        </ns1:declineTabs> 
       </ns1:tabs> 
       <ns1:customFields> 
        <ns1:textCustomFields> 
         <ns1:textCustomField> 
          <ns1:configurationType /> 
          <ns1:fieldId>1</ns1:fieldId> 
          <ns1:name>ID</ns1:name> 
          <ns1:required>true</ns1:required> 
          <ns1:show>false</ns1:show> 
          <ns1:value>12345</ns1:value> 
         </ns1:textCustomField> 
        </ns1:textCustomFields> 
       </ns1:customFields>     
      </ns1:signer> 
     </ns1:signers> 
    </ns1:recipients> 
</ns1:envelopeDefinition> 

谢谢!

回答

1

我知道它与以下请求正文一起工作。 解决的办法是将CustomFields移出“收件人”标记,并将其作为兄弟放到“收件人”标记。

<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi"> 
    <ns1:emailSubject>Test</ns1:emailSubject> 
    <ns1:status>created</ns1:status> 
    <ns1:documents> 
     <ns1:document> 
      <ns1:name>TestDocument</ns1:name> 
      <ns1:documentId>1</ns1:documentId> 
      <ns1:documentBase64>U09XIElE==</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>70</xPosition> 
          <yPosition>120</yPosition> 
          <height>30</height> 
          <width>50</width> 
         </ns1:approve> 
        </ns1:approveTabs> 
        <ns1:declineTabs> 
         <ns1:decline> 
          <documentId>1</documentId> 
          <pageNumber>1</pageNumber> 
          <xPosition>130</xPosition> 
          <yPosition>120</yPosition> 
          <height>30</height> 
          <width>50</width> 
         </ns1:decline> 
        </ns1:declineTabs> 
       </ns1:tabs>    
      </ns1:signer> 
     </ns1:signers> 
    </ns1:recipients> 
    <ns1:customFields> 
     <ns1:textCustomFields> 
      <ns1:textCustomField> 
       <ns1:configurationType /> 
       <ns1:fieldId>1</ns1:fieldId> 
       <ns1:name>ID</ns1:name> 
       <ns1:required>true</ns1:required> 
       <ns1:show>false</ns1:show> 
       <ns1:value>12345</ns1:value> 
      </ns1:textCustomField> 
     </ns1:textCustomFields> 
    </ns1:customFields> 
</ns1:envelopeDefinition> 
+0

感谢您发表问题的答案!请修改您的答案,以包含修补程序的简短说明。谢谢。 –

相关问题