Reputation: 546
We are currently experiencing some technical difficulties whilst developing an integrated web solution using docusign. Can you advise on the following please:
How do we assign an order of signing to recipients on a document based rest api call? Can we have a json example?
We are currently unable to retrieve a signing url for a user that has been added to a created envelope. This code was previously working for Template based envelope creation but does not work for ones based on using PDFs.
The call and response to the docusign API (with the password removed) is shown below. Two kinds of authentication method have been tried which failed. Retrieval via either of the emails found in the envelope also fails.
POST \\https://demo.docusign.net/restapi/v2/accounts/426142/envelopes/3b2d7418-27d3-4a80-8969-d875b6fb9548/views/recipient HTTP/1.1
X-DocuSign-Authentication: {"Username":"18f90756-70b1-4f5f-b360-48b198a17215","Password":"*REMOVED*","IntegratorKey":"*REMOVED*"}
Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml
Content-Type: application/json
Host: demo.docusign.net<http://demo.docusign.net>
Content-Length: 128
Accept-Encoding: gzip, deflate
{
"authenticationMethod": "email",
"userName": "Simon",
"email": "test@email",
"returnUrl": "http://www.google.com"
}
HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Length: 274
Content-Type: application/json; charset=utf-8
Date: Fri, 24 Jan 2014 12:11:38 GMT
Strict-Transport-Security: max-age=7776000; includeSubDomains
{
"errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
"message": "The recipient you have identified is not a valid recipient of the specified envelope. Envelope recipient could not be determined. 'clientUserId', 'email', or 'userName' in request and envelope may not match."
}
Upvotes: 4
Views: 6512
Reputation: 13500
First, regarding specifying order of recipients, this is simply done by setting the routingOrder property for each recipient. For example, this sample JSON shows a recipients structure that specifies John should receive the Envelope first (routingOrder=1) and Jane should receive the Envelope second (routingOrder=2):
"recipients": {
"signers": [
{
"name": "John Doe",
"email": "[email protected]",
"recipientId": "1",
"routingOrder": "1",
},
{
"name": "Jane Smith",
"email": "[email protected]",
"recipientId": "2",
"routingOrder": "2",
}
]
}
The "UNKNOWN_ENVELOPE_RECIPIENT" error message that you're receiving in response to the POST Recipient View request simply means that the recipient information you're supplying doesn't (exactly/completely) match info for any of the recipients in the Envelope you're specifying.
First, keep in mind that if you're wanting to use the POST Recipient View call to retrieve the URL that can be used to launch the recipient's signing session, then BOTH the Create Envelope request AND the POST Recipient View request must include the (same) clientUserId property value for the recipient. (The request JSON you posted doesn't include clientUserId.)
If including the clientUserId property in the POST Recipient View request doesn't resolve your issue, then to troubleshoot further, I'd suggest that you execute a Get Recipients call for the same Envelope, and compare the recipient properties in the response with the property values that you're supplying in your (unsuccessful) POST Recipient View call. The GET Recipients request is simply:
GET /accounts/{accountId}/envelopes/{envelopeId}/recipients
Upvotes: 10