Skip to main content

Hello,

I’d like to send a draft envelope via DocuSign API. The application uses ASP.NET Core.

What I’ve done so far, I retrieved the envelope with GetEnvelope and set Status as “sent”, then I called Update method to change the envelope status.

The envelope contains one Document, and 2 Recipients. 

And I received an error as follows : Error calling Update: {"errorCode":"INVALID_REQUEST_PARAMETER","message":"The request contained at least one invalid parameter. Value for 'purgeState' must be 'documents_queued' or 'documents_and_metadata_queued' or 'documents_dequeued' or 'documents_and_metadata_and_redact_queued'."}

I tried to set PurgeState as “documents_dequeued” (1) or “documents_queued” (2) but I received different error messages : (1) documents not in the purge queue, and (2) the envelope must be completed first, which is not the case.

I just want to send the draft envelope with documents to sign after storing the envelope id in our database, so I can keep track of the envelope status in our application.

Can you please help me, thanks.

Okay, I actually resolved the issue.

I just needed to pass a new Envelope with the updated Status, here's the code:
envelopes.Update(accountId, envelopeId, new Envelope { Status = "sent" })


Reply