Fred
Fred

Reputation: 389

Retrieving documents via SDK with certificate and only if signed

I'm using the C# SDK. In the even that a document is not delivered to the webhook address for whatever reason, or an end user accidentally deletes the document from the system on our end, I want to give them the ability to re-download it. I only want to download it if it was completed and I want to include the certificate.

As I understand it, if I get the envelope to check status and then immediately get the document, that is an API limit violation. So using two back to back calls is out. However, getting the status and making the user wait 15 minutes makes for a sub-optimal user experience.

I did find this link that says to append certificate=true to the querystring to include the certificate, however, I don't see an option for that in the C# SDK.

Any suggestions how I can accomplish these goals, hopefully in a single call, using the C# SDK? If it can't be done in the C# SDK is there a way to do it in a single call via a direct api call?

Upvotes: 0

Views: 146

Answers (1)

Praveen Reddy
Praveen Reddy

Reputation: 7393

Your understanding of DocuSign api limit violation is slightly wrong

As per the documentation

You may not exceed 1 GET request per unique envelope endpoint per 15 minutes.

So it is perfectly fine to make the following api calls in a 15 minute window as they are calling unique envelope endpoints.

  • Get status of an envelope
  • Download combined document for the envelope.

Unfortunately you will not be able to accomplish the above two actions in a single api call. There is no api at this point that supports it.

API Violation

[12:00:00] GET  /accounts/12345/envelopes/AAA 
[12:10:00] GET  /accounts/12345/envelopes/AAA  (*api rule violation)

Not an API Violation

[12:00:00] GET  /accounts/12345/envelopes/AAA 
[12:10:00] GET  /accounts/12345/envelopes/AAA//documents/combined?certificate=true

Upvotes: 3

Related Questions