2017-06-29 23 views
1

我試圖將名稱爲signature_1的表單域與預先填充的值signature_1進行轉換。Docusign API signHere選項卡 - 不將表單域轉換爲製表符

我一直在關注這個指南: https://www.docusign.com/developer-center/explore/features/stick-etabs

這裏是我已經寫了對這個問題的問題:https://github.com/karmaradio/karma/issues/440

的DocuSign是在合同上創建signHere標籤,但總是在頂部左邊,所以它不承認signature_1表單字段。

我送的DocuSign的對象:

{ 
    emailBlurb: "Please sign the document using link provided.", 
    emailSubject: "Karma document sign", 
    documents: [ 
    { 
     documentBase64: "encoded", 
     documentId: 1, 
     name: "jackum-mur-PAYE-1.pdf", 
     transformPdfFields: "true" 
    } 
    ], 
    recipients: { 
    signers: [ 
     { 
     email: "[email protected]", 
     name: "jackum mur", 
     recipientId: 1, 
     routingOrder: 1, 
     tabs: { 
      signHereTabs: [ 
      { 
       documentId: "1", 
       pageNumber: "1", 
       tabLabel: "signature_1" 
      } 
      ] 
     } 
     }, 
     { 
     email: "[email protected]", 
     name: "first signee", 
     recipientId: 2, 
     routingOrder: 2, 
     tabs: { 
      signHereTabs: [ 
      { 
       documentId: "1", 
       pageNumber: "1", 
       tabLabel: "signature_2" 
      } 
      ] 
     } 
     }, 
     { 
     email: "[email protected]", 
     name: "second signee", 
     recipientId: 3, 
     routingOrder: 3, 
     tabs: { 
      signHereTabs: [ 
      { 
       documentId: "1", 
       pageNumber: "1", 
       tabLabel: "signature_3" 
      } 
      ] 
     } 
     }, 
    status: "sent" 
} 
+0

能否請您提供一個鏈接到您的PDF文檔。 –

+0

嗨,我已經有一個響應表單docusign支持團隊誰指出我在複合模板的方向。當我和他們一起玩時,我會更新它。 – JMurphyWeb

回答

2

檢查已經共享了document後,以下JSON應適當隱蔽表單域。看看你的標籤標籤的慣例,不清楚哪些標籤適用於特定的收件人。所以我已經手動將每個tabLabel映射到收件人。在我的示例中,您可以根據正確的收件人移動標籤。

如果你想類似的標籤類型自動使用相同的數據填充,然後看here

這裏是CreateEnvelope請求。

POST/V2 /帳號/ {}帳戶ID /信封

{ 
    "emailSubject": "Document with Form fields", 
    "status": "sent", 
    "compositeTemplates": [ 
    { 
     "document": { 
     "documentBase64": "<Add the bas64 encoded document bytes here>", 
     "documentId": "1", 
     "name": "p60-form.pdf", 
     "transformPdfFields": "true" 
     }, 
     "inlineTemplates": [ 
     { 
      "sequence": "1", 
      "recipients": { 
      "signers": [ 
       { 
       "email": "[email protected]", 
       "name": "jackum mur", 
       "recipientId": "1", 
       "routingOrder": "1", 
       "tabs": { 
        "signHereTabs": [ 
        { 
         "tabLabel": "signature_1" 
        }, 
        { 
         "tabLabel": "signature_1DocuSignSignHere" 
        } 
        ], 
        "textTabs": [ 
        { 
         "tabLabel": "signature_1 Student Loan deductions", 
         "value" : "<Pre-Fill Tab Value here>" 
        }, 
        { 
         "tabLabel": "Student Loan deductions", 
         "value" : "<Pre-Fill Tab Value here>" 
        }, 
        { 
         "tabLabel": "PAYE reference", 
         "value" : "<Pre-Fill Tab Value here>" 
        }, 
        { 
         "tabLabel": "Your employer's full name and address (including postcode", 
         "value" : "<Pre-Fill Tab Value here>" 
        } 
        ] 
       } 
       }, 
       { 
       "email": "[email protected]", 
       "name": "first signee", 
       "recipientId": "2", 
       "routingOrder": "2", 
       "tabs": { 
        "signHereTabs": [ 
        { 
         "tabLabel": "signature_2" 
        }, 
        { 
         "tabLabel": "signature_2 DocuSignSignHere" 
        } 
        ], 
        "textTabs": [ 
        { 
         "tabLabel": "signature_2", 
         "value" : "<Pre-Fill Tab Value here>" 
        }, 
        { 
         "tabLabel": "signature_2 Your employers full name and address including postcode", 
         "value" : "<Pre-Fill Tab Value here>" 
        } 
        ] 
       } 
       }, 
       { 
       "email": "[email protected]", 
       "name": "second signee", 
       "recipientId": "3", 
       "routingOrder": "3", 
       "tabs": { 
        "signHereTabs": [ 
        { 
         "tabLabel": "signature_3" 
        }, 
        { 
         "tabLabel": "signature_3 DocuSignSignHere" 
        } 
        ], 
        "textTabs": [ 
        { 
         "tabLabel": "signature_3 PAYE reference", 
         "value" : "<Pre-Fill Tab Value here>" 
        } 
        ] 
       } 
       } 
      ] 
      } 
     } 
     ] 
    } 
    ] 
} 
+0

是的,這個伎倆。 – JMurphyWeb

+0

但您剛剛從我的問題中複製了答案。哪個好,但也有點奇怪:) – JMurphyWeb