[英]Using DocuSign API to create an envelope with multiple documents
我目前正在使用 DocuSign APi 將多個信封上傳到 DocuSign。 當信封只包含一個文檔時,它工作得很好,但是當我試圖一次上傳多個文檔時,我遇到了一個問題。
我正在將一組文檔傳遞給創建一個信封帖子 API,所有這些文檔都具有不同的名稱、內容和 ID,並且只有數組的第一個文檔由 DocuSign 導入。
我發送到 API 的正文如下所示:
{
templateId: 7b9b4c21-91db-428a-b405-0f045804c053,
documents: [
{
documentBase64: (the encoded value of the first document in base 64),
name: 'test first document',
fileExtension: 'pdf',
documentId: '1',
},
{
documentBase64: (the encoded value of the second document in base 64),
name: 'test second document',
fileExtension: 'pdf',
documentId: '2',
},
],
emailSubject: `[Dossier XXXXX ] NAME OF THE PERSONNE `,
templateRoles: [
{
email: test@test.com,
name: Testname,
defaultRecipient: true,
routingOrder: '1',
roleName: 'EMPRUNTEUR',
tabs: {
signHereTabs: [
{
documentId: '1',
height: '60',
locked: 'false',
pageNumber: 5,
required: 'true',
tabId: 'signature',
tabLabel: 'signer ici',
width: '120',
xPosition: '58',
yPosition: 360,
},
],
},
},
],
}
APi 沒有發送任何錯誤,一切似乎都很好,除了只導入了一個文檔(第一個,如果我嘗試切換我要發送的 2 個文檔的內容,則不會影響,只有內容的第一件事)
我錯過了什么嗎?
提前致謝
如果您嘗試在單個 API 調用中使用模板和附加文檔,則需要使用復合模板。 或者,您可以稍后將文檔添加到現有的 antelope,但我建議不要這樣做。
JSON 看起來像這樣:
"compositeTemplates": [
{
"document": {...},
"serverTemplates": [{...}],
"inlineTemplates": [{...}]
}
]
在這篇文章中查看如何使用復合模板: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/templates/composite/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.