Any way to get certificate of completion from DocuSign getAgreementPdf

1k views Asked by At

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

certificate of completion option in the web UI

2

There are 2 answers

1
Stephen Parish On BEST ANSWER

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.

1
Nima On

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."