如何在Docusign API中预先填写$ ID检查字段?

时间:2014-02-24 22:33:39

标签: docusignapi

有没有人知道如何在Docusign API中预先填写$ ID Check字段?我在API指南中找不到任何相关信息。该指南仅列出了如何预填充模板的方法。

3 个答案:

答案 0 :(得分:6)

本答案包含带有Headers,Body的JSON中的SOAP片段和完整REST调用,以及执行JSON主体所需的两个模板。使用多部分表单正文,以便在添加带有动态pdf字节的内联模板和文档时,您已经设置好了。

IDCheck的SOAP文档 DocuSign http://www.docusign.com/p/APIGuide/APIGuide.htm#Sending Group/IDCheckInformation.htm?Highlight=IDCheckInformationInput

DocuSign上的方法,参数和数据模型及方法的Live DocuSign SOAP帮助https://www.docusign.net/api/3.0/dsapi.asmx

DocuSign上的IDCheck REST文档http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST API References/Recipients/Signers Recipient.htm?Highlight=IDCheckConfigurationName

DocuSign上的方法,参数和数据模型和方法的Live DocuSign REST帮助https://www.docusign.net/restapi/help


通过SOAP(收件人的片段部分)

SOAP - XML(不是REST / XML(键值不同))

        <Recipients>
           <Recipient>
              <ID>1</ID>
              <UserName>David Grigsby</UserName>
              <Email>dgrigsbyds+idcheck@gmail.com</Email>
              <Type>Signer</Type>
              <AccessCode/>
              <RequireIDLookup>true</RequireIDLookup>
              <IDCheckConfigurationName>ID Check $</IDCheckConfigurationName>
                                         <IDCheckInformationInput>
                                                        <AddressInformationInput>
                                                                       <AddressInformation>
                                                                                      <Street1>104 Bremen Dr</Street1>
                                                                       </AddressInformation>
                                                                       <DisplayLevel>Editable</DisplayLevel>
                                                        </AddressInformationInput>
                                                        <DOBInformationInput>
                                                                       <DisplayLevel>Editable</DisplayLevel>
                                                        </DOBInformationInput>
                                         </IDCheckInformationInput>                 
              <RoutingOrder>1</RoutingOrder>
              <Note/>
              <SignInEachLocation>false</SignInEachLocation>
           </Recipient>

上面的XML示例作为IDCheck结果框:https://docusigninc.box.com/s/u4pj47lwom01h0clbjcn


通过REST(使用复合模板完成JSON,使用带有两个模板的表单模型)

您需要使用以下两个模板,另存为xml,上传模板,然后使用新模板ID替换下方,并添加两个不同的电子邮件

我喜欢使用Google Chrome和Postman在原型设计时发送REST或SOAP调用。

以下是我在下面的示例框中的信封中生成的两个签名文档 文件

DocA [box] https://docusigninc.box.com/s/cm1bf67prdoxmzoue8wd

DocB [box] https://docusigninc.box.com/s/1yl7rbjny61o3rfzv2t1

POST /restapi/v2/accounts/YourExternalAccountId/envelopes HTTP/1.1
Host: demo.docusign.net

HEADERS:
--------

X-DocuSign-Authentication: {"Username":"yourEmail","Password":"YourPassword","IntegratorKey":"YourIntegratorKey"}
Content-Type: multipart/form-data; boundary=AAA
Accept: application/json

BODY:
--------

--AAA
Content-Type: application/json
Content-Disposition: form-data

{
        "emailSubject": "Test 3",
        "emailBlurb": "Using two templates from composite template structure",
        "status": "sent",   
        "compositeTemplates": [{
               "serverTemplates": [{
                       "sequence": "1",
                       "templateId": "YourTemplateID1"
               }],
               "inlineTemplates": [{
                       "sequence": "1",
                       "recipients": {
                              "signers": [{
                                      "email": "youremail1@domain.com",
                                      "name": "your name (1)",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "requireIDLookup": "true",
                                      "idCheckConfigurationName": "Check $",
                                      "idCheckInformationInput" : {
                                        "addressInformationInput" : 
                                        {
                                            "addressInformation" :
                                            {
                                                "street1" : "123 main street"
                                            },
                                            "displayLevelCode" : "Editable"
                                        },
                                        "dobInformationInput" : 
                                        {
                                            "displayLevelCode" : "Editable"
                                        }

                                      },                                      
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "YourName",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "YourFirstName",
                                                     "tabLabel": "first_name"
                                             }]
                                      }
                              }]
                       }
               }]
        },
        {
               "serverTemplates": [{
                       "sequence": "2",
                       "templateId": "YourTemplateID2"
               }],
               "inlineTemplates": [{
                       "sequence": "2",
                       "recipients": {
                              "signers": [{
                                      "email": "youremail2@domain.com",
                                      "name": "Your Name (2)",
                                      "recipientId": "1",
                                      "roleName": "Role",
                                      "tabs": {
                                             "textTabs": [{
                                                     "value": "Your Name (2)",
                                                     "tabLabel": "name"
                                             },
                                             {
                                                     "value": "YourLastName",
                                                     "tabLabel": "last_name"
                                             }]
                                      }
                              }]
                       }
               }]
        }]
}


--AAA--

模板1

[box] https://docusigninc.box.com/s/dru41hdcgo9cqffqxzi4

上的模板XML
<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
    <EnvelopeTemplateDefinition>
        <TemplateID>82b2ce36-c6d1-41e5-9eb7-8c0d2b349057</TemplateID>
        <Name>A Simple</Name>
        <Shared>true</Shared>
        <TemplatePassword />
        <TemplateDescription />
        <LastModified>2014-02-25T19:57:01.337Z</LastModified>
        <PageCount>1</PageCount>
    </EnvelopeTemplateDefinition>
    <Envelope>
        <AccountId>6918840b-91f3-464a-a219-74df4df172a1</AccountId>
        <Documents>
            <Document>
                <ID>1</ID>
                <Name>a.pdf</Name>
                <PDFBytes>removed</PDFBytes>
            </Document>
        </Documents>
        <Recipients>
            <Recipient>
                <ID>1</ID>
                <UserName />
                <Email />
                <Type>Signer</Type>
                <AccessCode />
                <RequireIDLookup>false</RequireIDLookup>
                <SAMLAuthentication>
                    <SAMLAttributes />
                </SAMLAuthentication>
                <RoutingOrder>1</RoutingOrder>
                <Note />
                <RoleName>Role</RoleName>
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SignInEachLocation>false</SignInEachLocation>
            </Recipient>
        </Recipients>
        <Tabs>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>211</XPosition>
                <YPosition>63</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>Custom</Type>
                <Name>name</Name>
                <TabLabel>name</TabLabel>
                <Value />
                <CustomTabType>Text</CustomTabType>
                <CustomTabWidth>174</CustomTabWidth>
                <CustomTabHeight>11</CustomTabHeight>
                <CustomTabRequired>true</CustomTabRequired>
                <CustomTabLocked>false</CustomTabLocked>
                <CustomTabDisableAutoSize>false</CustomTabDisableAutoSize>
                <CustomTabValidationPattern />
                <CustomTabValidationMessage />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SharedTab>false</SharedTab>
                <RequireInitialOnSharedTabChange>false</RequireInitialOnSharedTabChange>
                <ConcealValueOnDocument>false</ConcealValueOnDocument>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>214</XPosition>
                <YPosition>98</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>Custom</Type>
                <Name>first_name</Name>
                <TabLabel>first_name</TabLabel>
                <Value />
                <CustomTabType>Text</CustomTabType>
                <CustomTabWidth>174</CustomTabWidth>
                <CustomTabHeight>11</CustomTabHeight>
                <CustomTabRequired>true</CustomTabRequired>
                <CustomTabLocked>false</CustomTabLocked>
                <CustomTabDisableAutoSize>false</CustomTabDisableAutoSize>
                <CustomTabValidationPattern />
                <CustomTabValidationMessage />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SharedTab>false</SharedTab>
                <RequireInitialOnSharedTabChange>false</RequireInitialOnSharedTabChange>
                <ConcealValueOnDocument>false</ConcealValueOnDocument>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>71</XPosition>
                <YPosition>142</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>SignHere</Type>
                <Name>Sign Here</Name>
                <TabLabel>Signature 3</TabLabel>
                <Value />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
        </Tabs>
        <Subject>Please DocuSign this document: a.pdf</Subject>
        <EmailBlurb />
        <SigningLocation>Online</SigningLocation>
        <AutoNavigation>true</AutoNavigation>
        <EnvelopeIdStamping>true</EnvelopeIdStamping>
        <AuthoritativeCopy>false</AuthoritativeCopy>
        <Notification>
            <Reminders>
                <ReminderEnabled>false</ReminderEnabled>
                <ReminderDelay>0</ReminderDelay>
                <ReminderFrequency>0</ReminderFrequency>
            </Reminders>
            <Expirations>
                <ExpireEnabled>true</ExpireEnabled>
                <ExpireAfter>120</ExpireAfter>
                <ExpireWarn>0</ExpireWarn>
            </Expirations>
        </Notification>
        <EnforceSignerVisibility>false</EnforceSignerVisibility>
        <EnableWetSign>true</EnableWetSign>
        <AllowMarkup>false</AllowMarkup>
        <AllowReassign>true</AllowReassign>
        <BrandId>c949b06b-5530-410e-b20b-12b3e5376957</BrandId>
    </Envelope>
</EnvelopeTemplate>

则Template2

链接[box] https://docusigninc.box.com/s/hf3c03br9tpvntjatffl

上的

模板XML

<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
    <EnvelopeTemplateDefinition>
        <TemplateID>f1a039c0-61d2-4983-a889-4a2d0fd9802d</TemplateID>
        <Name>B Simple</Name>
        <Shared>true</Shared>
        <TemplatePassword />
        <TemplateDescription />
        <LastModified>2014-02-25T19:58:36.1Z</LastModified>
        <PageCount>1</PageCount>
    </EnvelopeTemplateDefinition>
    <Envelope>
        <AccountId>6918840b-91f3-464a-a219-74df4df172a1</AccountId>
        <Documents>
            <Document>
                <ID>1</ID>
                <Name>b.pdf</Name>
                <PDFBytes>removed</PDFBytes>
            </Document>
        </Documents>
        <Recipients>
            <Recipient>
                <ID>1</ID>
                <UserName />
                <Email />
                <Type>Signer</Type>
                <AccessCode />
                <RequireIDLookup>false</RequireIDLookup>
                <SAMLAuthentication>
                    <SAMLAttributes />
                </SAMLAuthentication>
                <RoutingOrder>1</RoutingOrder>
                <Note />
                <RoleName>Role</RoleName>
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SignInEachLocation>false</SignInEachLocation>
            </Recipient>
        </Recipients>
        <Tabs>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>211</XPosition>
                <YPosition>63</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>Custom</Type>
                <Name>name</Name>
                <TabLabel>name</TabLabel>
                <Value />
                <CustomTabType>Text</CustomTabType>
                <CustomTabWidth>174</CustomTabWidth>
                <CustomTabHeight>11</CustomTabHeight>
                <CustomTabRequired>true</CustomTabRequired>
                <CustomTabLocked>false</CustomTabLocked>
                <CustomTabDisableAutoSize>false</CustomTabDisableAutoSize>
                <CustomTabValidationPattern />
                <CustomTabValidationMessage />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SharedTab>false</SharedTab>
                <RequireInitialOnSharedTabChange>false</RequireInitialOnSharedTabChange>
                <ConcealValueOnDocument>false</ConcealValueOnDocument>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>214</XPosition>
                <YPosition>97</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>Custom</Type>
                <Name>last_name</Name>
                <TabLabel>last_name</TabLabel>
                <Value />
                <CustomTabType>Text</CustomTabType>
                <CustomTabWidth>174</CustomTabWidth>
                <CustomTabHeight>11</CustomTabHeight>
                <CustomTabRequired>true</CustomTabRequired>
                <CustomTabLocked>false</CustomTabLocked>
                <CustomTabDisableAutoSize>false</CustomTabDisableAutoSize>
                <CustomTabValidationPattern />
                <CustomTabValidationMessage />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <SharedTab>false</SharedTab>
                <RequireInitialOnSharedTabChange>false</RequireInitialOnSharedTabChange>
                <ConcealValueOnDocument>false</ConcealValueOnDocument>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
            <Tab>
                <DocumentID>1</DocumentID>
                <RecipientID>1</RecipientID>
                <PageNumber>1</PageNumber>
                <XPosition>71</XPosition>
                <YPosition>142</YPosition>
                <ScaleValue>1</ScaleValue>
                <Type>SignHere</Type>
                <Name>Sign Here</Name>
                <TabLabel>Signature 3</TabLabel>
                <Value />
                <TemplateLocked>false</TemplateLocked>
                <TemplateRequired>false</TemplateRequired>
                <Bold>false</Bold>
                <Italic>false</Italic>
                <Underline>false</Underline>
            </Tab>
        </Tabs>
        <Subject>Please DocuSign this document: a.pdf</Subject>
        <EmailBlurb />
        <SigningLocation>Online</SigningLocation>
        <AutoNavigation>true</AutoNavigation>
        <EnvelopeIdStamping>true</EnvelopeIdStamping>
        <AuthoritativeCopy>false</AuthoritativeCopy>
        <Notification>
            <Reminders>
                <ReminderEnabled>false</ReminderEnabled>
                <ReminderDelay>0</ReminderDelay>
                <ReminderFrequency>0</ReminderFrequency>
            </Reminders>
            <Expirations>
                <ExpireEnabled>true</ExpireEnabled>
                <ExpireAfter>120</ExpireAfter>
                <ExpireWarn>0</ExpireWarn>
            </Expirations>
        </Notification>
        <EnforceSignerVisibility>false</EnforceSignerVisibility>
        <EnableWetSign>true</EnableWetSign>
        <AllowMarkup>false</AllowMarkup>
        <AllowReassign>true</AllowReassign>
        <BrandId>c949b06b-5530-410e-b20b-12b3e5376957</BrandId>
    </Envelope>
</EnvelopeTemplate>

答案 1 :(得分:0)

如果某些人需要这个C#...

 new Recipient
            {
                Email = email,                    
                Type = RecipientTypeCode.Signer,
                RequireIDLookup = true,
                IDCheckConfigurationName = "ID Check $",
                IDCheckInformationInput = new IDCheckInformationInput()
                {
                    AddressInformationInput = new AddressInformationInput()
                    {
                        AddressInformation = new AddressInformation() { 
                        City = city, 
                        State = state, 
                        Street1 = address,
                        Zip = zip }
                    },
                    DOBInformationInput = new DOBInformationInput() 
                    { 
                        DOBInformation = new DOBInformation() 
                        { 
                             DOB = dob
                        } 
                    },
                    SSN9InformationInput = new SSN9InformationInput() 
                    { 
                        SSN9Information = new SSN9Information()
                        {
                            SSN9 = ssn
                        }
                    }
                }
            };

答案 2 :(得分:0)

只是想在PHP中添加它,看来您必须将API模型添加到如下所示的每个值中。花了我一段时间才弄清楚,所以我想我会分享。

    $signer1 = new \DocuSign\eSign\Model\Signer([
        'email' => $customer->email, 
        'name' => $customer->fullName(),
        'role_name' => "Signer1",
        'recipient_id' => 1,
        'tabs' => [
            'textTabs' => 
                [
                     ['tabLabel' => 'Signer1_FullName',
                     'value' => $Signer1_FullName
                     ],
                     ['tabLabel' => 'Signer1_MailingAddress',
                     'value' => $Signer1_MailingAddress
                     ],
                ]

        ],
        'require_id_lookup' => "true",
        'client_user_id' => 1,

        // "id_check_configuration_name" => 'ID Check $',

        "id_check_information_input" => new \DocuSign\eSign\Model\IdCheckInformationInput([
              "address_information_input" => new \DocuSign\eSign\Model\AddressInformationInput([
                "address_information" => new \DocuSign\eSign\Model\AddressInformation([
                   "street1" => $customer->address,
                   "city" => $customer->city,
                   "state" => $customer->state,
                   "zip" => $customer->zip_code,
                ]),
                "display_level_code" => "Editable",
                "receive_in_response" => false
              ]),
              "dob_information_input" => new \DocuSign\eSign\Model\DobInformationInput([
            //  "dateOfBirth" => "sample string 1",
                "display_level_code" => "Editable"
              ]),
              "ssn9_information_input" => new \DocuSign\eSign\Model\Ssn9InformationInput([
            //  "ssn9" => "",
                "display_level_code" => "Editable"
              ])
          ]),



    ]);