RecipientId由docusign改变

时间:2017-08-29 04:40:17

标签: docusignapi

我正在使用DocuSign API创建信封。在创建信封时,我也传递了签名者列表,并设置了我自己独特的" RecipientId"每个签名者的(GUID)。但是当信封被创建并检查收件人(签名者)列表并发现收件人ID一直在变化时。它不是" RecipientId"我正在经过。

你能帮我解决一下我们如何设置自己的" RecipientId"在创造信封的同时?

- 创建信封请求

 { "documents": [{
                    "documentBase64": "<Base64BytesHere>", 
                    "documentId": "1", 
                    "fileExtension": "pdf", 
                    "name": "lite" 
                }], 
    "emailSubject": "test recipient 2", 
    "recipients": { "signers": [ { "email": "xxx.yyy@xxx.com", 
                                    "name": "xxx yyy", 
                                    "recipientId": "1" 
                                    } ]
                  }, 
    "status": "sent" 
 }

- Web钩子响应请参阅收件人ID -

<DocuSignEnvelopeInformation><EnvelopeStatus>
    <RecipientStatuses>
        <RecipientStatus>
            <Type>Signer</Type>
            <Email>xxx.yyy@abc.com</Email>
            <UserName>xxx yyy</UserName>
            <RoutingOrder>1</RoutingOrder>
            <Sent>2017-08-29T02:13:33.853</Sent>
            <DeclineReason xsi:nil="true"/>
            <Status>Sent</Status>
            <RecipientIPAddress/>
            <CustomFields/>
            <AccountStatus>Active</AccountStatus>
            <RecipientId>011eac75-f2fa-4f57-94df-5aedaxxxxxxx</RecipientId>
        </RecipientStatus>
    </RecipientStatuses>
....
<DocuSignEnvelopeInformation><EnvelopeStatus>

2 个答案:

答案 0 :(得分:2)

解决此问题的另一种方法是使用recipient.customFields。这是一个字符串数组:

someEnvelopeSigner.customFields = [yourUUID, somethingElse]

在webhook /事件通知中,它将以DocuSignEnvelopeInformation.EnvelopeStatus[0].RecipientStatuses[0].RecipientStatus[i].CustomFields的形式出现,看起来像(以JSON化形式)

{
  "CustomFields": [{
    "CustomField": [
      "6e45cb20-3953-11ea-b02d-dedef9da77b9",
      "something else!"
    ]
  }],
}

答案 1 :(得分:0)

您可以在创建信封时为每个收件人指定唯一的recipientId。

以下是CreateEnvelope请求示例

POST /v2/accounts/{accountId}/envelopes

Json Payload。

{
 "emailSubject": "Please sign the agreement",
 "status": "sent",
 "recipients": {
     "signers": [
         {
             "email": "janedoe@acme.com",
             "name": "jane doe",
             "recipientId": 1,
             "routingOrder": 1,
             "tabs": {
                 "signHereTabs": [
                     {
                         "documentId": "1", "pageNumber": "1", "xPosition": "80", "yPosition": "80"
                     }

                 ]
             }
         },
         {
             "email": "johnsmith@acme.com",
             "name": "john smith",
             "recipientId": 2,
             "routingOrder": 2,
             "tabs": {
                 "signHereTabs": [
                     {
                         "documentId": "1", "pageNumber": "1", "xPosition": "80", "yPosition": "180"
                     }

                 ]
             }
         }
     ]
 },
 "documents": [
     {
         "documentId": "1",
         "name": "Contract",
         "fileExtension": "txt",
         "documentBase64": "RG9jIFRXTyBUV08gVFdP"
     }
 ]
}

使用listEnvelopeRecipients api检索信封中的收件人列表。

{
  "signers": [
    {
        "creationReason": "sender",
        "isBulkRecipient": "false",
        "name": "jane doe",
        "email": "janedoe@acme.com",
        "recipientId": "1",
        "recipientIdGuid": "98d60cc3-5f67-46e4-9fc0-ca6bb519f1c9",
        "requireIdLookup": "false",
        "userId": "585b8733-b1a9-4329-87e7-4f20bcde00c2",
        "routingOrder": "1",
        "status": "sent"
    },
    {
        "creationReason": "sender",
        "isBulkRecipient": "false",
        "name": "john smith",
        "email": "johnsmith@acme.com",
        "recipientId": "2",
        "recipientIdGuid": "726bd54d-89ed-41ba-a751-fdb129894b8b",
        "requireIdLookup": "false",
        "userId": "45abe022-ae12-4816-8c42-fd66d207807a",
        "routingOrder": "2",
        "status": "created"
    }
  ],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "2",
"currentRoutingOrder": "1"
}