-->

Switch signers on an In Process shared document

2019-06-12 21:49发布

问题:

Is it possible to switch a signer (with tabs), on a shared document, once an envelope's In Process?

Our process goes like this:

  1. A single shared PDF document is generated (not using a DocuSign template) with signing placeholders for all signers.

  2. We create and send an envelope for the document PDF.

  3. One or more customers sign the document (using an embedded signing page).

  4. The last signer (our employee) signs the document (also using an embedded signing page).

The employee signer could be one of several employees, but, whomever it is, they'll always sign the same locations on the document. We'd like to be able to delay the choice of which employee signs the document until the end of the process, instead having to specify them at envelope creation.

Once the envelope is In Process, I'm able to add and delete employee recipients, but I can't find a way to include their tabs too. I include the tabs in the request, but the added employee is always in a draft-like 'created' state without tabs. The embedded view still asks the viewer to manually place their tabs. I need the tabs to be already placed and locked in position on the document so the employee can sign.

We're using the REST API and this needs to be an automated solution (no manual envelope corrections). Is there some way to achieve this or something similar?

Here's my add-recipient request

POST https://demo.docusign.net/restapi/v2/accounts/<account>/envelopes/<envelope-id>/recipients?resend_envelope=true

{
"signers" : [{
        "recipientId" : 4,
        "email" : "john@example.com",
        "name" : "John Citizen",
        "tabs" : {
            "initialHereTabs" : [{
                    "documentId" : "1",
                    "recipientId" : 4,
                    "name" : "InitialHere_3",
                    "pageNumber" : 1,
                    "xPosition" : 282,
                    "yPosition" : 454,
                    "tabName" : "InitialHere_3"
                }
            ],
            "signHereTabs" : [{
                    "documentId" : "1",
                    "recipientId" : 4,
                    "name" : "SignHere_3",
                    "pageNumber" : 1,
                    "xPosition" : 81,
                    "yPosition" : 447,
                    "tabName" : "SignHere_3"
                }
            ],
        },
        "clientUserId" : "LTEST_Resident4",
        "routingOrder" : 2,
    }
]
}

(I've also tried the same request with PUT instead of POST. The result is the same)

回答1:

It sounds like your workflow needs to do the following:

  1. Create Envelope with a "Blocker Recipient"
  2. Add Additional Recipient when they're identified
  3. Add Tags to new Recipient
  4. Delete "Blocker Recipient" when you want the document sent on

I'll assume you have 1. taken care of and I'll go through quick examples of 2-4.

2. Create Additional Recipient

POST: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients

{
    "signers": [
        {
            "email": "email@domain.com",
            "name": "Andrew Wilson",
            "recipientId": "3",
            "defaultRecipient": "true",
            "routingOrder": "3"
        }
    ]
}

3. Add Tags to Recipient

POST: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

{
    "signHereTabs": [
        {
            "xPosition": "100",
            "yPosition": "200",
            "documentId": "1",
            "pageNumber": "1"
        },
        {
            "xPosition": "200",
            "yPosition": "200",
            "documentId": "1",
            "pageNumber": "1"
        }
    ]
}

4. Delete Blocker Recipient

DELETE: https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}


回答2:

It sounds like you are trying to Modify or Correct and Resend Recipient Information.

https://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf Page 137

Modify or Correct and Resend Recipient Information

This lets you modify recipients in a draft envelope or correct recipient information for an in process envelope.For draft envelopes, you can edit: email, userName, routingOrder, faxNumber, deliveryMethod,accessCode and requireIdLookup. Once an envelope has been sent, you can only edit: email, userName, signerName, routingOrder,faxNumber, and deliveryMethod.You can also select to resend an envelope by using the resend_envelope option.

Example Request:

    PUT https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/recipients?resend_envelope=true

    X-DocuSign-Authentication:<DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
    Accept: application/json
    Content-Type: application/json

    {

    "signers": [
        {
            "email": "email@domain.com",
            "name": "John Smith",
            "recipientId": "1"
        }
    ]
}

Response

The response returns if the correction was successful.The following example shows the response json body.

Example Response:

{
    "recipientUpdateResults": [
        {
            "errorDetails": {
                "errorCode": "SUCCESS",
                "message": ""
            },
            "recipientId": "1"
        }
    ]
}


标签: docusignapi