Docusign - api get utl to download document - docusignapi

I need api to create URL link for download document of envelope.
I found this api:
GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
But this api just return the file and i what a URL i can download the file (of course with expired time)

The endpoint you're looking for is:
POST /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient
You will need to provide in the body information about the recipient, see here for details:
https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient
We also have code examples in various langagues to show you how to do this here:
https://developers.docusign.com/esign-rest-api/code-examples/code-example-request-a-signature-via-email

Related

Google Form API - unable to retrieve a respondent email

I am using Google Form API to create a sample project to create, update & get responses to a form.
I am using the following documentation for reference and understanding:
https://developers.google.com/forms/api/reference/rest/v1/forms.responses
It mentions that a single response body (using response ID) includes the respondent email, but each time I trigger the API, the respondent email is undefined and hence does not get returned in the response body.
What am I doing wrong?
Please note I am not using the Apps Script. I am using the API in a node.js project.
Thank you

Any way to get certificate of completion from DocuSign getAgreementPdf

I am using DocuSign clickWrap API to download completed clickwraps;
I am able to download the completed clickwrap only - not able to find a way to download the completion certificate as part of the clickwrap response (like we have in the web UI)... there is no option in the API document for getAgreementPdf either
You can download the certificate through the getAgreementPdf endpoint
by appending the query parameter: include_coc=true. This seems to be missing from the live documentation, but is present in the Swagger spec.
Full example:
GET /clickapi/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}?include_coc=true
The agreement ID can be found either through the callback of onAgreed:
docuSignClick.Clickwrap.render({
//...
onAgreed: (agreementData) => {
// agreementData.agreementId
}
}, '#host-element');
Or through a POST to createHasAgreed with the same clientUserId.
You can get the certificate of completion by calling this endpoint:
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopedocuments/get/
"If the account option Attach certification of completion to envelope is on, then the Certificate of Completion is also included in the PDF file."

Shopware 6 call api from backend

I am making a new backend page where you should be able to download an export.
I already got the the route and the export working. If I call my export action from curl with sw-access-key I get my download: store-api/v3/_action/orderer-export/77f40024cfd448d9a90063a75dc9fb2e
How do I make the download link with auth?
Update
I added a service and created it like:
vendor/shopware/administration/Resources/app/administration/src/module/sw-import-export/service/importExport.service.js
Also changed store-api to api in my DownloadRoute.php: #RouteScope(scopes={"api"})
Now I can use this new service to call my API and the the file contents as response. Still no download.
Looking at \Shopware\Core\Content\ImportExport\Controller\ImportExportActionController::download I finally got it.
Simply add defaults={"auth_required"=false} to your route:
#Route("/api/v{version}/_action/import-export/file/download", name="api.action.import_export.file.download", defaults={"auth_required"=false}, methods={"GET"})
Security Warning: If your download contains non public information you need to add a secure token or download link. Otherwise your download is free for anyone. Shopwares own ImportExport generates download links with a token. Have a look there.

while signing the pdf it returns Error UNABLE_TO_LOAD_DOCUMENT

while loading pdf in docusign API in order to sign the pdf file, it gives error "Unable to load the document.". I am attaching the pdf for reference.
full error message is as below from API:
<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<errorCode>UNABLE_TO_LOAD_DOCUMENT</errorCode>
<message>Unable to load the document. Unable to load Document(1;
Retail AMP - Pexe CO-1 MM Piza Hut-RDE-CC21.pdf). Error: Expected Base.String</message>
</errorDetails>
Please find below Docusign link for reference:
https://support.docusign.com/en/cases/05599635
Thanks.
There are two ways to send documents to DocuSign via the API:
You can use Base64 encoding, which means you serialize the document into a very long string. If you used this method - please ensure that you correctly sereaized the document and that the string you send in the API call, is inedeed a correct string representing a base64 PDF.
You can send it as a binary transfer, this more efficient and less popular mean of uploading documents via the API. You can find out how to do this and see an example of code to upload files:
https://developers.docusign.com/esign-rest-api/code-examples/code-example-send-binary

Retrieve signed document using DocuSign API

I want to download a document signed recipient using DocuSign API (REST).
I am using the following endpoint as per the documentation.
HTTP request
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}
Request Headers
X-DocuSign-Authentication:{"Username": <Username>,"Password": <Password>,"IntegratorKey": <IntegratorKey>}
Accept: application/pdf
Content-Transfer-Encoding:base64
I got document in a base64 format which I am able to download but when try to open that file using PDF viewer we got the following message:
The file is blank and some error related to signature, check following screenshot
PDF open error snapshot
Are there any parameters missing while downloading the document? Please help.
Thanks.
See this link for EnvelopeId stamp control
https://support.docusign.com/en/articles/How-do-I-move-the-Envelope-ID-Stamp-on-my-documents
In DEMO environment you will always have the "demonstration only" stamp on the document. This will not be present when you goto prod environment

Resources