Downloading populated pdf after generating envelop

2019-08-04 12:13发布

We are using embedded Signing feature. We are using templates for generating envelopes for embedded signing. We have a requirement for downloading pdf (before signing). This pdf should contain pre-populated data in envelope. We have tried to download pdf by using rest API as below, but it is giving blank (without prepopulated value - as in template) pdf. Is there any way to achieve the same?

https://demo.docusign.net/restapi/v2/accounts/{our account id}/envelopes/{envolopID}/documents/{documentId}

标签: docusignapi
1条回答
闹够了就滚
2楼-- · 2019-08-04 12:54

The way that DocuSign works is that when you layer data fields and other DocuSign tabs onto your documents they are not part of the document until it is signed by the recipients who are to take actions on those tabs. One of the reasons is because someone might change the initial data to something else when it is their turn to sign (if they have permissions to) so when the document is still pending the pre-populated values are not included in the download.

You can, however, still retrieve the values of your fields while the envelope is still pending. Since tabs are always specific to recipients you need to download tab information for whichever recipients they are configured for.

To download the tabs for this recipient including the initial pre-populated values you would make the following api call:


URL:

/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

Formats:

XML, JSON

HTTP Method:

GET

HTTP Body:

(empty)


If the envelope in question had one data field (textTab) which has the value "test data", then the response would look like:

"textTabs": [
    {
        "height": 11,
        "validationPattern": "",
        "validationMessage": "",
        "shared": "false",
        "requireInitialOnSharedChange": "false",
        "name": "Text",
        "value": "test data",
        "width": 138,
        "required": "true",
        "locked": "false",
        "concealValueOnDocument": "false",
        "disableAutoSize": "false",
        "tabLabel": "Data Field 3",
        "bold": "false",
        "italic": "false",
        "underline": "false",
        "documentId": "1",
        "recipientId": "58576405-2f0b-45a4-998b-1cb81b769d22",
        "pageNumber": "1",
        "xPosition": "105",
        "yPosition": "499",
        "tabId": "7e1441bc-700e-43d4-b968-b7fa36887ee2"
    }
]
查看更多
登录 后发表回答