![](/img/trans.png)
[英]Docusign API - Unable to pre-fill fields with validation (Number mask)
[英]How to pre-fill $ID Check fields in Docusign API?
有誰知道如何在Docusign API中預先填寫$ ID Check字段? 我在API指南中找不到任何相關信息。 該指南僅列出了如何預填充模板的方法。
本答案包含帶有Headers,Body的JSON中的SOAP片段和完整REST調用以及執行JSON主體所需的兩個模板。 使用多部分表單正文,以便在添加具有動態pdf字節的內聯模板和文檔時,您已經設置好了。
DocuSign上的IDCheck SOAP文檔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參考/收件人/簽名者Recipient.htm?突出顯示= 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--
模板XML在[方框] 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>
鏈接上的模板XML [框] 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>
如果有些人需要這個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
}
}
}
};
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.