Get signature option in DocuSign envelop

16 Views Asked by At

I am sending an envelop to user from DocuSign account. In my application I want to get URL for an envelop in postman. I am getting an URL but once I open the URL signature option is not coming.

I am calling below createRecipientView endpoint.

URL: https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopId}/views/recipient

In request body sending: recipient_id, userName, email, authenticationMethod, returnUrl

I am getting URL for an envelop but signature tab is not there to sign on envelop.

1

There are 1 best solutions below

0
Inbar Gazit On

You have to add the signature tab to the envelope in the API call where you make the envelope. It's part of the recipient object, because tabs are tied to recipients.

Here is what this JSON may look like, in this case using anchor strings to position (you can also used fixed positioning with xPosition and yPosition instead)

{
    "emailSubject": "Please sign this document set",
    "documents": [
        {
            "documentBase64": "' > $request_data
            cat $doc1_base64 >> $request_data
            printf '",
            "name": "Order acknowledgement",
            "fileExtension": "html",
            "documentId": "1"
        },
        {
            "documentBase64": "' >> $request_data
            cat $doc2_base64 >> $request_data
            printf '",
            "name": "Battle Plan",
            "fileExtension": "docx",
            "documentId": "2"
        },
        {
            "documentBase64": "' >> $request_data
            cat $doc3_base64 >> $request_data
            printf '",
            "name": "Lorem Ipsum",
            "fileExtension": "pdf",
            "documentId": "3"
        }
    ],
    "recipients": {
        "carbonCopies": [
            {
                "email": "'"${CC_EMAIL}"'",
                "name": "'"${CC_NAME}"'",
                "recipientId": "2",
                "routingOrder": "2"
            }
        ],
        "signers": [
            {
                "email": "'"${SIGNER_EMAIL}"'",
                "name": "'"${SIGNER_NAME}"'",
                "recipientId": "1",
                "routingOrder": "1",
                "tabs": {
                    "signHereTabs": [
                        {
                            "anchorString": "**signature_1**",
                            "anchorUnits": "pixels",
                            "anchorXOffset": "20",
                            "anchorYOffset": "10"
                        },
                        {
                            "anchorString": "/sn1/",
                            "anchorUnits": "pixels",
                            "anchorXOffset": "20",
                            "anchorYOffset": "10"
                        }
                    ]
                }
            }
        ]
    },
    "status": "sent"
}