0

我们需要向用户发送抄送,我搜索了 REST API xml 格式,但没有找到合适的示例。请让我知道 REST API 的 xml 格式的抄送请求的格式。我们使用以下格式,但抄送不起作用。有人可以帮助我们吗?

<signer>
<recipientId>1</recipientId> 
<routingOrder>1</routingOrder> 
<email>abc@xyz.com</email> 
<name>abc</name> 
</signer>
<signer>
<recipientId>3</recipientId> 
<routingOrder>3</routingOrder> 
<email>abcd@xyz.com</email> 
<name>abcd</name> 
</signer>
</signers>
<carbonCopies>
<carbonCopy>
<recipientId>2</recipientId> 
<routingOrder>2</routingOrder> 
<email>abce@xyz.com</email> 
<name>abce</name> 
</carbonCopy>
</carbonCopies>
</recipients>
</envelopeDefinition>
4

1 回答 1

0

我不清楚您所说的“抄送不起作用”的确切含义,但是您的抄送收件人的 XML 对我来说看起来是正确的。即,这种格式对我有用:

<carbonCopies>
  <carbonCopy>
    <email>janesemail@outlook.com</email>
    <name>Jane Doe</name>
    <recipientId>2</recipientId>
    <routingOrder>2</routingOrder>
  </carbonCopy>
</carbonCopies>

例如,使用以下 XML,我可以使用 DocuSign 服务器模板创建一个信封——将签名者映射到模板角色Signer1,然后添加额外的 (Cc) 收件人。

POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes

<envelopeDefinition xmlns="http://www.docusign.com/restapi">
   <accountId>ACCOUNT_ID</accountId>
   <status>sent</status>
   <compositeTemplates>
    <compositeTemplate>
        <serverTemplates>
            <serverTemplate>
                <sequence>1</sequence>
              <templateId>TEMPLATE_ID</templateId>
            </serverTemplate>
        </serverTemplates>
        <inlineTemplates>
            <inlineTemplate>
                <sequence>2</sequence>
                <recipients>
                  <signers>
                    <signer>
                     <email>johnsemail@outlook.com</email>
                     <name>John Doe</name>
                     <recipientId>1</recipientId>
                     <roleName>Signer1</roleName>
                    </signer>
                  </signers>
                  <carbonCopies>
                    <carbonCopy>
                      <email>janesemail@outlook.com</email>
                      <name>Jane Doe</name>
                      <recipientId>2</recipientId>
                      <routingOrder>2</routingOrder>
                    </carbonCopy>
                  </carbonCopies>
               </recipients>
            </inlineTemplate>
        </inlineTemplates>
    </compositeTemplate>
  </compositeTemplates>
</envelopeDefinition>

如果我随后执行“获取收件人”请求(GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/收件人)对于这个信封,我可以看到为信封创建了签名者和抄送者。这是“获取收件人”响应(JSON 格式):

{
    "signers": [
        {
            "name": "John Doe",
            "email": "johnsemail@outlook.com",
            "recipientId": "1",
            "recipientIdGuid": "733ca7c0-8f52-490c-8dcf-ad3ecd4ecccb",
            "requireIdLookup": "false",
            "userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
            "routingOrder": "1",
            "note": "",
            "roleName": "Signer1",
            "status": "sent",
            "templateLocked": "false",
            "templateRequired": "false"
        }
    ],
    "agents": [],
    "editors": [],
    "intermediaries": [],
    "carbonCopies": [
        {
            "name": "Jane Doe",
            "email": "janesemail@outlook.com",
            "recipientId": "2",
            "recipientIdGuid": "74307df2-fed6-4cbd-938e-cff949c06c76",
            "requireIdLookup": "false",
            "userId": "2c9e06eb-f2c5-4bef-957a-5a3dbd6edd25",
            "routingOrder": "2",
            "status": "created"
        }
    ],
    "certifiedDeliveries": [],
    "inPersonSigners": [],
    "recipientCount": "2",
    "currentRoutingOrder": "1"
}
于 2013-11-12T16:13:51.907 回答