-->

Embedded Signing (REST API PHP)

2019-09-06 14:09发布

问题:

Is there anyway to auto poplate the user details when using embedded signing view (REST API PHP).

Actually we are using embedded signing view rest api in our application. We need to auto populate user address details in the sign document when he is going to sign the docuement.

We have the following fields in the document.

Firts name, last name, email, address1, address2, city, state, country, postal code and etc..

We need to populate all the above fields with user details. Is this possible in embedded signing view (REST API PHP).

If possible send me refernce links are videos. Please help me on this.

Thanks in advance.

Thanks, Srinivas Reddy.A

回答1:

Yes you can definitely populate tabs in an embedded signing view. This is all controlled through the

tabLabel 

property of each tab in your request body. For instance, if you login to the DocuSign Console and add two data fields (textTabs) to your envelope where one has the label "email" and the other has a label of "address" then the following JSON body prefills those tabs based on the value passed. I just tested this and it works:

{
"accountId": "123456",
"emailSubject": "DocuSign API - Embedded Signing w/ Populated Values Example",
"emailBlurb": "Email body goes here",
"templateId": "9347C7AF-7EEE-.................................",
"templateRoles": [
    {
        "email": "sample@email.com",
        "name": "John Doe",
        "roleName": "Signer1",
        "clientUserId": "1001",
        "tabs": {
            "textTabs": [
                {
                    "tabLabel": "address",
                    "value": "123 Main St. SF, CA"
                },
                {
                    "tabLabel": "email",
                    "value": "sample@email.com"
                }
            ]
        }
    }
],
"status": "sent"

}

All you have to do is add your remaining tabs (i.e. city, state, zip, etc) and you're good to go. Just make sure you match the tabLabel in your JSON with the Label that you give each tab when adding through the Console.



标签: docusignapi