Pregunta

Does anyone know how to pre-fill $ID Check fields in Docusign API? I can't find any relevant information in API guide. The guide only lists a way on how to prefill the template.

¿Fue útil?

Solución

This Answer contains a SOAP Fragment and a Complete REST Call in JSON with Headers, Body and the two templates with tabs needed for to execute the JSON body. The multi-part form body is used so that when you add inline templates and documents with dynamic pdf bytes you are already setup.

SOAP Documentation for IDCheck at DocuSign http://www.docusign.com/p/APIGuide/APIGuide.htm#Sending Group/IDCheckInformation.htm?Highlight=IDCheckInformationInput

Live DocuSign SOAP Help for methods, parameters and data model and methods at DocuSign https://www.docusign.net/api/3.0/dsapi.asmx

REST Documentation for IDCheck at DocuSign http://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST API References/Recipients/Signers Recipient.htm?Highlight=IDCheckConfigurationName

Live DocuSign REST Help for methods, parameters and data model and methods at DocuSign https://www.docusign.net/restapi/help


Via SOAP (fragment part of recipient)

SOAP – XML (Not REST / XML(key values are different))

        <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>

Sample of above XML as a IDCheck Result at box: https://docusigninc.box.com/s/u4pj47lwom01h0clbjcn


via REST (Complete JSON using Composite Template and Form model with two template)

You will need to use the two templates below, save as xml, upload templates and then replace below with the new template ids, and add your two different emails

I like to use Google Chrome with Postman to send REST or SOAP calls when prototyping.

Here are the two resulting signed documents from the envelope from my below example at box Doc

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--

Template1

Template XML at [box] https://docusigninc.box.com/s/dru41hdcgo9cqffqxzi4

<?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

Template XML at link [box] https://docusigninc.box.com/s/hf3c03br9tpvntjatffl

<?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>

Otros consejos

In case some needs this for 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
                        }
                    }
                }
            };

Just wanted to add that in PHP, it seems that you have to add the API Model to each one of the values like below. Took me a while to figure out so I thought I would share.

    $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"
              ])
          ]),



    ]);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top