Please share docusign API to download signed document. Request body.
https://developers.docusign.com/docs/esign-rest-api/how-to/download-envelope-documents/ has this in 8 different coding languages.
the request is a GET call, so the request body is not needed (empty).
You make a GET call to this endpoint:
{base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}/documents/${doc_choice}
You will need your:
base_path - in the developer account it would be https://demo.docusign.net/restapi/
account_id - your accountId for the account that was used to create the envelope
envelope_id - your envelopeId for the envelope sent for signing.
doc_choice - your documentId or if you want to get a ZIP file, combined or PDF portfolio.
Related
I am using REST API (docusign). I need to get the field "sentDateTime" from the signers.
I use this Request:
/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients
The REST API never returns the field "sentDateTime" from the signers.
How can I get this field from the signers?
Thanks
You can't get this field from the signers/recipients. Instead, you will get the field from the envelope they are included in. See below:
Currently API does not return "sentDateTime" for each signer, once Signer completes the signing ceremony then you can see two fields, "signedDateTime" and "deliveredDateTime" in the API response. I would propose to use DocuSign Connect for getting these values as it saves you from polling, In DS Connect, DocuSign sends below data for each recipient
<RecipientStatus>
<Type>Signer</Type>
<Email>signerEmail#gmail.com</Email>
<UserName>Signer1</UserName>
<RoutingOrder>1</RoutingOrder>
<Sent>2017-11-22T11:22:36.833</Sent>
<Delivered>2017-11-22T11:26:10.607</Delivered>
<Signed>2017-11-22T11:26:20.483</Signed>
After running the console app, our users get an email with the signing link to Docusign making them remote signers.
What I want to be able to do is get those links from their emails.
I did some research and this is what each url is made of
https://demo.docusign.net/Member/EmailStart.aspx?
a=65d11cf7-d3b7-49a1-8000-6192b6227d71& <<< Unique Activity ID? Always different in all URLs
acct=a0e816ac-3919-475e-a826-34c2c33f90e7& <<< Some kind of role ID (stays same between envelopes and users of the same role, I have it
for my roles..just don't know how to get it programmatically
er=62378ec0-39ce-495e-84e4-e0e598fab3cc& <<<< envelopesApi.ListRecipients(.....) .Signers[n].RecipientIdGuid, able to get it
espei=30cec285-39cd-45a3-bb8e-7bd0560dcd80 <<<< ENVELOPE ID, able to get it
The first parameter is the main focus of my question - it is a total mistery what is it and how to get it
The second parameter looks like a role_id, but I don't know how to get it other than hard-coding values for each of my roles
The other two parameters aren't a concern.
Does anybody know how to get ahold of the first two parameters using the C# Docusign API?
Or even better, is there a way to get the recipients signing url links using the same API?
To obtain the signing URL you will have to set the recipient as an embedded recipient.
After the envelope is created, use the createRecipient:EnvelopeViews api to retrieve the Signing URL.
You have to set the recipient clientUserId parameter to mark a recipient as an embedded recipient.
Request
{
"userName": "name",
"email": "examble#email.com",
"clientUserId": "clientUserId",
"authenticationMethod": "email",
"returnUrl": "your app url"
}
DocuSignAPI for Salesforce.
Hello everybody, I'm following this manual to access the DocuSign API in Force.com / Salesforce.com account in order to send an object with a single click of a button to be isgned.
http://developer.force.com/cookbook/recipe/accessing-docusign-api-from-salesforcecom-to-send-contracts-for-esignatures
the problems is when i get the next error:
"The DocuSign EnvelopeId:Exception - System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: The email address for the recipient is invalid. The recipient Id follows. faultcode=soap:Client faultactor=https://demo.docusign.net/api/3.0/dsapi.asmx"
Do anyone know the solution?
Thank you.
Re your specific error, I suggest that you download the API call logging information from DocuSign itself to see exactly what you sent to DocuSign via Salesforce.
In general for Salesforce/DocuSign integration, recommended first step is to use DocuSign for Salesforce, available from the Salesforce app store.
Additional developer information and source code is available from this blog post. It includes info on recipes (including source code) from DocuSign that document how to call the DocuSign API from Salesforce.
One issue to watch out for: you can't send PDFs from Salesforce to DocuSign due to callout limitations enforced by Salesforce.
Solutions:
you can make a call to a gateway (which you write). Your gateway would then pull the doc from Salesforce and then send it to DocuSign
Or use DocuSign for Salesforce which does the above for you.
thank you for your answer.
At the end the solution was that the email of the person that I wanted to send the document to sign didnt exist :P.
But now my problem is How can I update the Docusign status? becouse when I put this in an "execute anonymous windows" that creates me a Status:
dsfs__DocuSign_Status__c status = new dsfs__DocuSign_Status__c();
status.dsfs__Contract__c='0293900000xD';
status.dsfs__Envelope_Status__c='Sent';
upsert status;
but when i use this inside of a controller extension:
try {
DocuSignAPI.EnvelopeStatus es = dsApiSend.CreateAndSendEnvelope(envelope);
envelopeId = es.EnvelopeID;
// this.contract.DocuSign_Status__c=es.Status;
dsfs__DocuSign_Status__c status = new dsfs__DocuSign_Status__c();
status.dsfs__Contract__c=this.contract.Id;
status.dsfs__Envelope_Status__c=es.Status;
upsert status;
} catch ( CalloutException e) {
System.debug('Exception - ' + e );
envelopeId = 'Exception - ' + e;
}
Doesn't work, the Status is never created.
Thank you for your help.
in my MVC framework in codeignitor I have to working on docusign the electronic sign using api after sign document how to get response of that is if sign completed or process or cancel etc..
$response = $service->views->getRecipientView(
$returnUrl, $envelopeId, $contact_name,
$contact_email, $client_id, $authMethod
);
You can determine what action the recipient took during the embedded signing flow by parsing the re-direct URL. Once they are done signing in the iFrame or webview they will be re-directed to the URL you specified in your $returnUrl parameter.
For instance, if your return URL is https://www.docusign.com/developer-center and the user successfully signed the document the return URL would look like:
https://www.docusign.com/developer-center?event=signing_complete
Or if the recipient declined to sign then the return URL would look like:
https://www.docusign.com/developer-center?event=decline
All of this info (including code samples) is available through the QuickStart section of the DocuSign Developer Center and in the API Documentation.
In Docusign, given an envelope Id, how can I get at some identifying info (e.g. email address) as to who originated/created/sent the document using the API only?
Thanks.
It depends on your use-case. One way is to make the Get Envelope Recipient Status API call which will return status - and other metadata such as email, name, recipientId, etc. - for the envelope recipients:
Get Envelope Recipient Status
You can also make the Get Envelope Audit Events API call, which will return some identifying info such as email and name and also what actions were taken:
Get Envelope Audit Events
Lastly, I believe the Get Envelope Certificate API call will probably return the most complete audit trail since it's returns the CoC (Certificate of Completion) which lists anything and everything any recipient has ever done to the envelope. However the result of this call is a PDF (doc) so you'd have to parse that doc for specific information you're looking for.
Get Envelope Certificate